From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Changing point for commas and commas for point
Date: Sun, 21 Jan 2007 13:49:47 -0500
Message-ID: <28242.1169405387@sss.pgh.pa.us> (raw)
In-Reply-To: <55c095e90701211041t40c9bb5br91c94ad1d9b37a7c@mail.gmail.com>
References: <55c095e90701211041t40c9bb5br91c94ad1d9b37a7c@mail.gmail.com>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, ezequias.rocha@gmail.com
Subject: Re: Changing point for commas and commas for point
In-Reply-To: <28242.1169405387@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox