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

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

From
"lothar.behrens@lollisoft.de"
Date:
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


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

From
Tom Lane
Date:
"lothar.behrens@lollisoft.de" <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