Re: The notorious to_char bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: greg(at)turnstep(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: The notorious to_char bug
Date: 2002-09-18 15:12:19
Message-ID: 17921.1032361939@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

greg(at)turnstep(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-09-18 15:15:27 Re: Backend crash (long)
Previous Message Rod Taylor 2002-09-18 15:11:00 Re: Backend crash (long)