Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group