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

From: Marti Raudsepp <marti(at)juffo(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Don't truncate integer part in to_char for 'FM99.'
Date: 2011-09-08 12:59:57
Message-ID: CABRT9RAf5yp_6rSBW7vWYpJFZWeFyLpCUqPN7hLpaVo3zrfaqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 7, 2011 at 23:48, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-09-08 13:03:14 Re: pg_last_xact_insert_timestamp
Previous Message Marko Tiikkaja 2011-09-08 12:11:52 EXPLAIN and nfiltered, take two