Re: [PATCH] Don't truncate integer part in to_char for 'FM99.'

Marti Raudsepp <marti@juffo.org>

From: Marti Raudsepp <marti@juffo.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2011-09-08T12:59:57Z
Lists: pgsql-hackers
On Wed, Sep 7, 2011 at 23:48, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Also, the way yours is set up, I'm dubious that it
> does the right thing when the last '0' specifier is to the left of the
> decimal point.

When the last '0' is left of the decimal point, Num->zero_end is set
to 0, so the branch dealing with that is never executed.

> I'm currently testing this patch:

Looks good to me. It's potentially less efficient, but I'm not worried
about that.

Regards,
Marti