]> granicus.if.org Git - postgresql/commit
Fix assorted bogosities in cash_in() and cash_out().
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 29 Oct 2011 18:31:15 +0000 (14:31 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 29 Oct 2011 18:31:15 +0000 (14:31 -0400)
commit5b297de51b014e510c59d0bdffe8130afccabc3c
treeb18d422876094e373fa2681a61f04e05b4df28a5
parent7208e0bb907cb794d95ddc25c6f05cf0465667ce
Fix assorted bogosities in cash_in() and cash_out().

cash_out failed to handle multiple-byte thousands separators, as per bug
#6277 from Alexander Law.  In addition, cash_in didn't handle that either,
nor could it handle multiple-byte positive_sign.  Both routines failed to
support multiple-byte mon_decimal_point, which I did not think was worth
changing, but at least now they check for the possibility and fall back to
using '.' rather than emitting invalid output.  Also, make cash_in handle
trailing negative signs, which formerly it would reject.  Since cash_out
generates trailing negative signs whenever the locale tells it to, this
last omission represents a fail-to-reload-dumped-data bug.  IMO that
justifies patching this all the way back.
src/backend/utils/adt/cash.c