From: | Euler Taveira de Oliveira <euler(at)timbira(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Subject: | Re: [HACKERS] wrong behavior using to_char() again |
Date: | 2007-11-23 03:54:03 |
Message-ID: | 47464EDB.2020607@timbira.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Bruce Momjian wrote:
> OK, I researched this and realized it should have been obvious to me
> when I added this code in 2006 that making the thousands separator
> always "," for a locale of "" was going to cause a problem.
>
I tested your patch and IMHO it breaks the glibc behavior. I'm providing
a SQL script [1] and a diff [2] showing the differences between before
and after applying it. In [2], I see a lot of common used (pt_*, es_*,
and fr_*) locales that we'll be changed. Is it the behavior we want to
support? I think we shouldn't try to fix glibc bug inside PostgreSQL (in
this case, use should accept "" as a possible value for thousands_sep).
> I don't think there is any change needed for the C locale. That part
> seems fine, as Alvaro already pointed out.
>
I don't know about C locale, but it's broken too. In PostgreSQL, it's
following the en_US behavior. Comments?
euler(at)harman:/a/pgsql$ ./a.out C
decimal_point: "."
thousands_sep: ""
euler(at)harman:/a/pgsql$ ./a.out en_US
decimal_point: "."
thousands_sep: ","
[1] http://timbira.com/tmp/lcn3.sql
[2] http://timbira.com/tmp/lcnumeric.diff
--
Euler Taveira de Oliveira
http://www.timbira.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2007-11-23 04:43:10 | Re: wrong behavior using to_char() again |
Previous Message | Christopher Browne | 2007-11-23 02:59:15 | Re: Autovacuum and OldestXmin |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2007-11-23 04:43:10 | Re: wrong behavior using to_char() again |
Previous Message | Alvaro Herrera | 2007-11-23 01:57:07 | Re: plpython crash on exception |