Обсуждение: locale question

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

locale question

От
Oliver Vecernik
Дата:
Hi,

I've got SuSE 7.3 with PostgreSQL 7.1.3 server an a system where
LANG=de_DE@euro. I tried to import some data with:

\copy im from '/usr/share/data/pricelist.csv' using delimiters '|'

and got following message:

\.
ERROR:  copy: line 1, Bad numeric input format '1018,11'
PQendcopy: resetting connection

It seems the price with , is not recognized by psql, although LANG is set.

Can I check if PostgreSQL was compiled --with-locale option (I believe
it is after checking the Source RPM)? Can anybody give me a hint?

Best Regards,
Oliver


Re: locale question

От
Tom Lane
Дата:
Oliver Vecernik <vecernik@aon.at> writes:
> ERROR:  copy: line 1, Bad numeric input format '1018,11'

> It seems the price with , is not recognized by psql, although LANG is set.

IIRC, the only numerical datatype we have that allows locale-specific
formatting is MONEY, which is deprecated for lack of sufficient range.

I'm afraid you'll have to do some sed-hacking on your datafile.  Sorry.

            regards, tom lane