From: | Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> |
---|---|
To: | Holger Marzen <holger(at)marzen(dot)de> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Formatting numbers in psql? |
Date: | 2002-09-27 14:16:51 |
Message-ID: | 20020927161650.B12011@zf.jcu.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Sep 26, 2002 at 10:52:11PM +0200, Holger Marzen wrote:
> Hi *,
>
> can I format numbers in psql output with decimal separators, say 1234567
> will be displayed as 1.234.567 or 1,234,567?
G = group by locale
D = decimal point be locale
test=# select to_char(123456789.012, '999G999G999D999');
to_char
------------------
123 456 789,012
(1 row)
- on locale independent:
test=# select to_char(123456789.012, '999,999,999.999');
to_char
------------------
123,456,789.012
(1 row)
Karel
--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/
C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
From | Date | Subject | |
---|---|---|---|
Next Message | Andriy Tkachuk | 2002-09-27 14:58:05 | Re: query speed depends on lifetime of frozen db? |
Previous Message | Glen Baker | 2002-09-27 13:46:44 | 7.0 -> 7.2 Migration (oops) |