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) ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster