From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Euler Taveira de Oliveira <euler(at)timbira(dot)com> |
Cc: | Jorge Godoy <jgodoy(at)gmail(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [BUGS] wrong behavior using to_char() |
Date: | 2007-02-09 04:21:39 |
Message-ID: | 200702090421.l194Lep10898@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-patches |
Euler Taveira de Oliveira wrote:
> Jorge Godoy wrote:
>
> > > In the pt_BR locale, the thousand separator is "". So it should return
> >
> > The thousands separator in pt_BR is ".".
> >
> Oh, good catch. There is so much hack in my glibc. :-)
I researched this thread:
http://archives.postgresql.org/pgsql-bugs/2006-09/msg00074.php
Ultimately, the result was that glibc was wrong in its locale settings,
and there was a suggestion to use defaults only when using the C locale.
However, I am worried there are too many locales in the field that only
define some of the locale setting, so doing defaults only for the C
locale might not work.
The minimal patch I wrote (attached), suppresses the default for the
thousands separator only if is is the same as the decimal separator. I
think this is the only area where the default could potentially match
the locale setting for another field.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Attachment | Content-Type | Size |
---|---|---|
/pgpatches/to_char | text/x-diff | 1.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-02-09 04:29:11 | Re: [BUGS] wrong behavior using to_char() |
Previous Message | Asif Ali | 2007-02-08 20:00:32 | Re: server crash: displaying sqlerrm in exception block |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-02-09 04:29:11 | Re: [BUGS] wrong behavior using to_char() |
Previous Message | Koichi Suzuki | 2007-02-09 04:13:38 | Re: [HACKERS] Full page writes improvement |