bug in numeric locale

From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: bug in numeric locale
Date: 2002-06-28 20:59:19
Message-ID: Pine.LNX.4.44.0206281632330.2001-100000@cm-lcon-46-187.cm.vtr.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello:

I'm having a problem with to_char(numeric, text) in certain locales
(mine, at least). I have configured with --enable-locale and initdb'd
with LC_ variables set to es_CL.

testing=# SELECT to_char(2000.5, '9G999D9');
to_char
----------
2,000,5
(1 row)

My locale specifies

$ locale -k LC_NUMERIC
decimal_point=","
thousands_sep=""
grouping=-1;-1
numeric-decimal-point-wc=44
numeric-thousands-sep-wc=0
numeric-codeset="ISO-8859-15"

It seems a glibc bug to me (the thousands_sep should be "."); however,
it seems also a Postgres bug as it is using the C locale standard
thousands separator. If I redefine the es_CL locale with the right
settings, it works ok.

This is the current REL7_2_STABLE CVS version under Linux 2.4.19 and
glibc 2.2.4.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"Ni aun el genio muy grande llegaria muy lejos
si tuviera que sacarlo todo de su propio interior" (Goethe)

Browse pgsql-bugs by date

  From Date Subject
Next Message Webb Sprague 2002-06-28 21:38:51 Pass through query help (please ...:)
Previous Message Jay Berkenbilt 2002-06-28 20:16:26 Re: psql 7.2.1: \d (alone) missing from \?