Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] trouble with to_char('L')

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [GENERAL] trouble with to_char('L')
Date: 2009-06-03 18:06:00
Message-ID: 8122.1244052360@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp> writes:
> Tom Lane wrote:
>> * This seems to be assuming that the user has set LC_MONETARY and
>> LC_NUMERIC the same.  What if they're different?

> Strictky speaking they should be handled individually.

I thought about this some more, and I wonder why you did it like this at
all.  The patch claimed to be copying the LC_TIME code, but the LC_TIME
code isn't trying to temporarily change any locale settings.  What we
are doing in that code is assuming that the system will give us back
the localized strings in the encoding identified by CP_ACP; so all we
have to do is convert CP_ACP to wide chars and then to UTF8.  Can't we
use a similar approach for the output of localeconv?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2009-06-03 18:44:12
Subject: Re: 8.4b2 tsearch2 strange error
Previous:From: Magnus HaganderDate: 2009-06-03 17:59:28
Subject: Re: It's June 1; do you know where your release is?

pgsql-general by date

Next:From: Erik JonesDate: 2009-06-03 18:14:36
Subject: Re: warm standby with WAL shipping
Previous:From: Louis LamDate: 2009-06-03 17:54:57
Subject: Re: catalog view use to find DATABASE, LANGUAGE, TABLESPACE, SCHEMA, SEQUENCE privileges granted to user or role

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group