Re: allowing ',' (comma) in float8

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: allowing ',' (comma) in float8
Дата
Msg-id 20050619122545.GA32482@wolff.to
обсуждение исходный текст
Ответ на allowing ',' (comma) in float8  (stig erikson <stigerikson_nospam_@yahoo.se>)
Список pgsql-novice
On Sun, Jun 12, 2005 at 12:17:12 +0200,
  stig erikson <stigerikson_nospam_@yahoo.se> wrote:
> hi.
> is it possible to use flort values with a comma as decimal placeholder?
>
> i am trying to use copy to insert a table, the table contains a few columns
> with numerical values such as price, the vales are given on the format
> "2345,12", postgresql seems to allow only "2345.12".
>
> can i change the behavior on postgresql to allow ',' as decimal placeholder?
>
> postgresql 7.4.6

It looks like you can probably use to_number to convert the input string
to numeric if ',' is the decimal separator in the locale you are using.
You can then cast the numeric value to float.

В списке pgsql-novice по дате отправления:

Предыдущее
От: Andreas Kretschmer
Дата:
Сообщение: Re: [despammed] allowing ',' (comma) in float8
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Storing an array to Postgresql table