Further fix for psql's code for locale-aware formatting of numeric output.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: b7d17eca577e01ef50a5f5d09e42f6b271cceee1
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2015-09-25T16:20:46Z
Releases: 9.3.10
Further fix for psql's code for locale-aware formatting of numeric output.

(Third time's the charm, I hope.)

Additional testing disclosed that this code could mangle already-localized
output from the "money" datatype.  We can't very easily skip applying it
to "money" values, because the logic is tied to column right-justification
and people expect "money" output to be right-justified.  Short of
decoupling that, we can fix it in what should be a safe enough way by
testing to make sure the string doesn't contain any characters that would
not be expected in plain numeric output.

Files

PathChange+/−
src/bin/psql/print.c modified +23 −7