Re: thousands comma numeric formatting in psql - Mailing list pgsql-patches

From Eugen Nedelcu
Subject Re: thousands comma numeric formatting in psql
Date
Msg-id 20050622085440.GA371@sifolt.ro
Whole thread Raw
In response to thousands comma numeric formatting in psql  (Eugen Nedelcu <eugen@sifolt.ro>)
Responses Re: thousands comma numeric formatting in psql
List pgsql-patches
Hello,

I have included my patch attached to this mail.

I have made the changes to deal with locale settings from client
environment. So now you can start psql like this:

(export LC_ALL=ro_RO; psql -U user db)

and have numeric formatting with '.' as thousands separator and
',' as decimal point, or

(export LC_ALL=en_US; psql -U user db)

and have numeric formatting with ',' as thousands separator and
'.' as decimal point. This formatting is default when locale is 'C'

You can set any locale and numeric formatting code will take it in
consideration.

This patch is for version 7.3.2. The steps for install is:

1) cp thousands_comma.diff $POSTGRES_DIR/src/bin/psql
2) cd $POSTGRES_DIR/src/bin/psql
3) patch -p0 < thousands_comma.diff
4) ../../../configure && make


Best Regards,
Eugen

Attachment

pgsql-patches by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Function's LEAST, GREATEST and DECODE (Oracle vararg
Next
From: Tom Lane
Date:
Subject: Re: plperl validator function