From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Support more locale-specific formatting options in cash_out(). |
Date: | 2011-10-30 19:03:06 |
Message-ID: | E1RKaew-0001QZ-R3@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Support more locale-specific formatting options in cash_out().
The POSIX spec defines locale fields for controlling the ordering of the
value, sign, and currency symbol in monetary output, but cash_out only
supported a small subset of these options. Fully implement p/n_sign_posn,
p/n_cs_precedes, and p/n_sep_by_space per spec. Fix up cash_in so that
it will accept all these format variants.
Also, make sure that thousands_sep is only inserted to the left of the
decimal point, as required by spec.
Per bug #6144 from Eduard Kracmar and discussion of bug #6277. This patch
includes some ideas from Alexander Lakhin's proposed patch, though it is
very different in detail.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/6743a878a4e9442a9846d8c270e5028e514d44f3
Modified Files
--------------
src/backend/utils/adt/cash.c | 166 ++++++++++++++++++++++++++++++++++--------
1 files changed, 134 insertions(+), 32 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | User Mhasegawa | 2011-10-31 01:28:08 | pgbulkload - pgbulkload: Add restriction of client_encoding in Japanese |
Previous Message | Tom Lane | 2011-10-30 16:22:24 | pgsql: Further improvement of make_greater_string. |