Re: [HACKERS] Odd behavior of type coercion for datetime - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Odd behavior of type coercion for datetime
Date
Msg-id 13109.921509889@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Odd behavior of type coercion for datetime  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.us> writes:
> Have we dealt with this?
>> With 6.4 or current sources, I find that coercing a datetime to float8
>> is a no-op:

With current sources I get

regression=> select t from dt1;
t
----------------------------
Mon Mar 15 09:56:01 1999 EST
(1 row)

regression=> select t::float8 from dt1;
ERROR:  Bad float8 input format 'Mon Mar 15 09:56:01 1999 EST'
regression=>

which seems to be reasonable behavior.  (I believe Tom made this
happen by removing binary equivalence between datetime and float8.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: [SQL] Functional Indexes
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] NEXTSTEP porting problems