pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedlocale question
3+ messages / 3 participants
[nested] [flat]
* locale question
@ 2001-11-30 13:25 Oliver Vecernik <vecernik@aon.at>
2001-11-30 15:21 ` Re: locale question Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Oliver Vecernik @ 2001-11-30 13:25 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: locale question
2001-11-30 13:25 locale question Oliver Vecernik <vecernik@aon.at>
@ 2001-11-30 15:21 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2001-11-30 15:21 UTC (permalink / raw)
To: Oliver Vecernik <vecernik@aon.at>; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Locale question
@ 2005-04-24 13:45 Matthew T. O'Connor <matthew@zeut.net>
0 siblings, 0 replies; 3+ messages in thread
From: Matthew T. O'Connor @ 2005-04-24 13:45 UTC (permalink / raw)
To: pgsql-general@postgresql.org; pgsql-admin
I have a (hopefully simple) question regarding locale.
I am migrating a postgresql database from a server running FC1 &
PostgreSQL 7.4 to a newer machine running FC2 and PostgreSQL 8.0. I
dumped the data from the old server using pg_dumpall and restored it to
the new server with no problems, and while testing the new server
everything seems to be OK.
However, I did notice that the client and server encoding settings on
the old server are set to SQL_ASCII whereas those same settings on the
new server are set to LATIN1.
I'm wondering if I might wind up with some lurking problems since I
don't really understand all the implications of locale settings.
Thanks,
Matthew O'Connor
Details below:
On the old server
-bash-2.05b$ cat /etc/redhat-release
Fedora Core release 1 (Yarrow)
-bash-2.05b$ locale
LANG=en_US
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
-bash-2.05b$ psql template1
Welcome to psql 7.4.3, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
template1=# show all;
name | setting
--------------------------------+---------------------------------------
client_encoding | SQL_ASCII
lc_collate | en_US
lc_ctype | en_US
lc_messages | en_US
lc_monetary | en_US
lc_numeric | en_US
lc_time | en_US
server_encoding | SQL_ASCII
On the new server:
-bash-2.05b$ cat /etc/redhat-release
Fedora Core release 2 (Tettnang)
-bash-2.05b$ locale
LANG=en_US
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
-bash-2.05b$ psql template1
Welcome to psql 8.0.2, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
template1=# \o foo
template1=# show all;
name | setting
--------------------------------+---------------------------------------
client_encoding | LATIN1
lc_collate | en_US
lc_ctype | en_US
lc_messages | en_US
lc_monetary | en_US
lc_numeric | en_US
lc_time | en_US
server_encoding | LATIN1
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-04-24 13:45 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-11-30 13:25 locale question Oliver Vecernik <vecernik@aon.at>
2001-11-30 15:21 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-04-24 13:45 Locale question Matthew T. O'Connor <matthew@zeut.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox