pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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-0008Ho-7S@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_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/2ab199b354135f199a895c4ee61c521b03a4d321

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(-)



view thread (12+ messages)  latest in thread

Message-ID: <E1R1PLb-0008Ho-7S@gemulon.postgresql.org>
Permalink:  ../E1R1PLb-0008Ho-7S@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1R1PLb-0008Ho-7S@gemulon.postgresql.org

 · 

reply

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-0008Ho-7S@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