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@zf.jcu.cz>
http://home.zf.jcu.cz/~zakkr/
C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz