Re: [HACKERS] Warning!!

Thomas Lockhart <lockhart@alumni.caltech.edu>

From: "Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
To: The Hermit Hacker <scrappy@hub.org>
Cc: "D'Arcy J.M. Cain" <darcy@druid.net>, pgsql-hackers@postgreSQL.org
Date: 1998-11-04T07:34:52Z
Lists: pgsql-hackers
> > > Any last minute "no, don't do it" naysayers out there? :)
> > I have this idea for a new feature...

*grin* Thanks D'Arcy. Glad to see we didn't pound your sense of humor
out of ya. Will try harder next time ;)

I've been able to reproduce Jose's report of problems when casting
floats to text. The problem is that there is no explicit float to text
conversion function, but for other reasons I had decided to make float
and datetime equivalent (to allow weird date arithmetic). When Postgres
starts fishing around for conversion functions, it matches them up:

tgl=> select text(f) from a where f = 1;
text
----------------------------
Sat Jan 01 00:00:01 2000 GMT
(1 row)

Yuck. Anyway, I don't think it is a show stopper, and can be fixed with
a patch and in the v6.4.1 release. Probably should not make datetime and
float binary equivalent types as they are now.

                   - Tom