Skip site navigation (1) Skip section navigation (2)

pgsql: Fix corner case bug in numeric to_char().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix corner case bug in numeric to_char().
Date: 2011-09-07 21:07:51
Message-ID: E1R1PLb-0008Hk-1e@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
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
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/5df20a6e4f5eee5eef1b28760ceca604f57d535b

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 LaneDate: 2011-09-08 04:53:45
Subject: pgsql: One last round of copy-editing for the 9.1 release notes.
Previous:From: Tom LaneDate: 2011-09-07 21:07:50
Subject: pgsql: Fix corner case bug in numeric to_char().

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group