Re: The notorious to_char bug - Mailing list pgsql-hackers

From Tom Lane
Subject Re: The notorious to_char bug
Date
Msg-id 17921.1032361939@sss.pgh.pa.us
Whole thread Raw
In response to The notorious to_char bug  (greg@turnstep.com)
Responses Re: The notorious to_char bug  ("Jonah H. Harris" <jharris@nightstarcorporation.com>)
List pgsql-hackers
greg@turnstep.com writes:
> (From the SQL list:)

>> And we know it is a bug:
>> * to_char(0,'FM999.99') returns a period, to_char(1,'FM999.99') does not

> I took a look at this bug a week ago, and noticed that inside of the file 
> src/backend/utils/adt/formatting.c
> we are specifically causing the above behavior, perhaps in an effort to 
> mimic Oracle's implementation of it.

Hm.  Can anyone try these cases on Oracle?  If the code goes out of its
way to have this odd behavior, maybe it's because Oracle does too.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: Re: Backend crash (long)
Next
From: Tom Lane
Date:
Subject: Re: Backend crash (long)