pgsql: Support more locale-specific formatting options in cash_out(). - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Support more locale-specific formatting options in cash_out().
Date
Msg-id E1RKaew-0001QZ-R3@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Further improvement of make_greater_string.
Next
From: mhasegawa@pgfoundry.org (User Mhasegawa)
Date:
Subject: pgbulkload - pgbulkload: Add restriction of client_encoding in Japanese