How to detect float format by passing SQL_CHAR to float column ?

How to detect float format by passing SQL_CHAR to float column ?

am 19.01.2006 16:27:09 von Lothar Behrens

Hi,

as the documentation of postgresql, there is a floating point format
like 10.1234 but I do not see
10,1234. Is that ever like the documentation ?

The issue is because I pass a SQL_CHAR value from a GUI text control
that allows also a comma
in the string.

If there are commas possible, how do I detect it ?

Thanks, Lothar


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Re: How to detect float format by passing SQL_CHAR to float column ?

am 19.01.2006 16:39:53 von Tom Lane

"lothar.behrens@lollisoft.de" writes:
> as the documentation of postgresql, there is a floating point format
> like 10.1234 but I do not see
> 10,1234. Is that ever like the documentation ?

No, we deliberately do not support locale-dependent numeric styles.
At least not in simple data entry --- IIRC, you can convert such
strings with to_char()/to_number().

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match