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 CABRT9RD4gp6RkbDjy8wLq1o6p0fsmUpmn2DGOsKvNhGptyGssw@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>)
Responses Re: [PATCH] Don't truncate integer part in to_char for 'FM99.'
List pgsql-hackers
On Wed, Sep 7, 2011 at 21:37, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Hmm.  I agree that this is a bug, but the proposed fix seems like a bit
> of a kluge. Wouldn't it be better to make get_last_relevant_decnum
> honor its contract, that is not delete any relevant digits?

You're right, it was a kludge.

Here's an improved version. I need to take a NUMProc* argument to do
that right, because that's how it knows how many '0's to keep from the
format.

What do you think?

Regards,
Marti

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [PATCH] Log crashed backend's query (activity string)
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Don't truncate integer part in to_char for 'FM99.'