From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix corner case bug in numeric to_char().
Date: Wed, 07 Sep 2011 21:07:51 +0000
Message-ID: <E1R1PLb-0008Hu-6g@gemulon.postgresql.org> (raw)
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
------
REL8_2_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/eb9a98b6e2657ca65c4ddbe2536b26880864ff8f
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix corner case bug in numeric to_char().
In-Reply-To: <E1R1PLb-0008Hu-6g@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox