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

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 (view raw or flat)
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)




pgsql-bugs by date

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

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