Re: decimal seperator

From: Mladen Gogala <mladen(dot)gogala(at)vmsinfo(dot)com>
To: Andrej <andrej(dot)groups(at)gmail(dot)com>
Cc: Jasmin Dizdarevic <jasmin(dot)dizdarevic(at)gmail(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: decimal seperator
Date: 2011-01-05 01:44:27
Message-ID: 4D23CCFB.1020002@vmsinfo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 1/4/2011 8:39 PM, Andrej wrote:
> On 5 January 2011 14:16, Jasmin Dizdarevic<jasmin(dot)dizdarevic(at)gmail(dot)com> wrote:
>> Hi,
>> is there a way to change the way how postgresql outputs floating point
>> numbers?
>> For example:
>> Instead of 2.34 => 2,34 or
>> Instead of 334,323.53 => 334.323,53
>> Can this be adjusted per session?
> Does this help?
> http://www.postgresql.org/docs/current/interactive/runtime-config-client.html#GUC-LC-NUMERIC
>

Not really:

mgogala=# set lc_numeric='de_DE';
SET
mgogala=# select 1/5::float;
?column?
----------
0.2
(1 row)

mgogala=#

As you can see, I did set lc_numeric to the locale which uses decimal
comma, not the decimal point and got back a point. I would have to do
that with to_char function.

--
Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
www.vmsinfo.com

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jasmin Dizdarevic 2011-01-05 01:46:16 Re: decimal seperator
Previous Message Andrej 2011-01-05 01:39:34 Re: decimal seperator