Fix corner case bug in numeric to_char().

Tom Lane <tgl@sss.pgh.pa.us>

Commit: f0bedf3e456c52274995d32d4c0c8a250de5c1ca
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2011-09-07T21:07:20Z
Releases: 9.2.0
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.

Files