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