Re: [PATCH] Don't truncate integer part in to_char for 'FM99.' - Mailing list pgsql-hackers

From Marti Raudsepp
Subject Re: [PATCH] Don't truncate integer part in to_char for 'FM99.'
Date
Msg-id CABRT9RAf5yp_6rSBW7vWYpJFZWeFyLpCUqPN7hLpaVo3zrfaqg@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Don't truncate integer part in to_char for 'FM99.'  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-hackers by date:

Previous
From: Marko Tiikkaja
Date:
Subject: EXPLAIN and nfiltered, take two
Next
From: Robert Haas
Date:
Subject: Re: pg_last_xact_insert_timestamp