Fix corner case bug in numeric to_char().
Trailing-zero stripping applied by the FM specifier could strip zeroes
to the left of the decimal point, for a format with no digit positions
after the decimal point (such as "FM999.").
Reported and diagnosed by Marti Raudsepp, though I didn't use his patch.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/f0bedf3e456c52274995d32d4c0c8a250de5c1ca
Modified Files
--------------
src/backend/utils/adt/formatting.c | 27 ++++++++++++++++++++-------
src/test/regress/expected/numeric.out | 18 ++++++++++++++++++
src/test/regress/sql/numeric.sql | 4 ++++
3 files changed, 42 insertions(+), 7 deletions(-)
pgsql-committers by date
| Next: | From: Tom Lane | Date: 2011-09-07 21:07:51 |
| Subject: pgsql: Fix corner case bug in numeric to_char(). |
| Previous: | From: Bruce Momjian | Date: 2011-09-07 19:44:23 |
| Subject: pgsql: Allow bcc32 and win32 batch files to compile libpq. |