]> granicus.if.org Git - postgresql/commit
Fix corner case bug in numeric to_char().
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 7 Sep 2011 21:06:33 +0000 (17:06 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 7 Sep 2011 21:06:33 +0000 (17:06 -0400)
commit2ab199b354135f199a895c4ee61c521b03a4d321
tree4b75ea0541fd6726ce41fa13f85535a4f4634713
parentb2658c348eeb12d4cf87c21e05ddb5d97e4f043b
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.
src/backend/utils/adt/formatting.c
src/test/regress/expected/numeric.out
src/test/regress/sql/numeric.sql