On Thu, Jul 05, 2007 at 05:10:57PM -0700, Chris Travers wrote:
> I am trying to find a way to select the number format at runtime for 
> textual representation of numbers.  I am currently running 8.1.4 built 
> from source on Fedora Linux core 5.
> 
> I have been trying to use set lc_numeric = various country codes (for 
> example es_EC), but I am not able to get the format to change from 1.00 
> to 1,00. 

I think you'll need to use to_char():

test=> set lc_numeric to 'es_ES.UTF-8';
SET
test=> select to_char(1.234, '9D999');
 to_char 
---------
  1,234
(1 row)

The file src/backend/utils/adt/pg_locale.c in the PostgreSQL source
code has comments about how various LC_* settings are used in the
backend.

-- 
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to