The notorious to_char bug - Mailing list pgsql-hackers

From greg@turnstep.com
Subject The notorious to_char bug
Date
Msg-id 20020918134228.B99BA476834@postgresql.org
Whole thread Raw
Responses Re: The notorious to_char bug  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(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. Unless I am missing something, it 
seems that we can simply take out the hack inside of the above file, 
or mark the bug as solved...

Search for the strings "terrible" and "terible" to find the spots 
inside of formatting.c

Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200209180909

-----BEGIN PGP SIGNATURE-----

iD8DBQE9iIDvvJuQZxSWSsgRAqRLAJ9gV8oTnMFTsSmQzMdKppNlWW/TvACgvDu2
f0TDVbi//F5jwZn7K9+9wLE=
=TIs7
-----END PGP SIGNATURE-----




pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: unaccent
Next
From: Tom Lane
Date:
Subject: Re: RPMS for 7.3 beta.