Re: Changing point for commas and commas for point - Mailing list pgsql-sql

From Tom Lane
Subject Re: Changing point for commas and commas for point
Date
Msg-id 28242.1169405387@sss.pgh.pa.us
Whole thread Raw
In response to Changing point for commas and commas for point  ("Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com>)
List pgsql-sql
"Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com> writes:
> Here in my country (Brazil) we have the decimal simbol as ' , ' (commas) and
> thousand separator as ' . ' (point)

> Here my sql uses:  to_char(sum(My_column), '99990D00')

That's the right thing.

> Is there any way to make this happens ?

I think you forgot to set LC_NUMERIC.

regression=# select to_char(42.45, '99990D00'); to_char
-----------    42.45
(1 row)

regression=# set lc_numeric TO 'pt_PT.iso88591';
SET
regression=# select to_char(42.45, '99990D00'); to_char
-----------    42,45
(1 row)

The specific locale names available vary across OSes ... try "locale -a"
for a list.
        regards, tom lane


pgsql-sql by date:

Previous
From: "Ezequias Rodrigues da Rocha"
Date:
Subject: Changing point for commas and commas for point
Next
From: Andreas Kretschmer
Date:
Subject: Re: Changing point for commas and commas for point