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: pgsql-hackers-owner@postgresql.org
[mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Tom Lane
Sent: Wednesday, September 18, 2002 9:12 AM
To: greg@turnstep.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] The notorious to_char bug
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
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly