Re: FM suffix in to_char Y/YY/YYY still screwy - Mailing list pgsql-hackers

From Brendan Jurd
Subject Re: FM suffix in to_char Y/YY/YYY still screwy
Date
Msg-id [email protected]
Whole thread Raw
In response to FM suffix in to_char Y/YY/YYY still screwy  (Tom Lane <[email protected]>)
List pgsql-hackers
On 8 April 2010 06:46, Tom Lane <[email protected]> wrote:
> Not a lot of zero suppression happening there :-(.
>
> I believe the correct fix is to reduce the year mod 100 (or 10 or 1000)
> before feeding it to snprintf, rather than playing games with printing
> only part of the result string as the original and current code try to
> do.

I think you're right.  FM should behave as advertised, even for years.

Cheers,
BJ


pgsql-hackers by date:

Previous
From: Dhiraj Lohiya
Date:
Subject: Re: Enhancing phonetic search support for more languages - GSoC 2010
Next
From: Greg Stark
Date:
Subject: A maze of twisty mailing lists all the same