Oracle 8.1.7.2

SQL> SELECT to_char(0,'FM999.99') AS tst_char FROM dual;

TST_CHA
-------
0.

SQL> SELECT to_char(1,'FM999.99') AS tst_char FROM dual;

TST_CHA
-------
1.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tom Lane
Sent: Wednesday, September 18, 2002 9:12 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [HACKERS] The notorious to_char bug


[EMAIL PROTECTED] 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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to