Обсуждение: How to detect float format by passing SQL_CHAR to float column ?

Поиск
Список
Период
Сортировка

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

От
"lothar.behrens@lollisoft.de"
Дата:
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 ?

От
Tom Lane
Дата:
"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