Re: [HACKERS] Odd behavior of type coercion for datetime

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Odd behavior of type coercion for datetime
Date: 1999-03-15 14:58:09
Message-ID: 13109.921509889@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-03-15 15:01:17 Re: [HACKERS] Another speedup idea (two, even)
Previous Message Bruce Momjian 1999-03-15 14:53:15 Re: [HACKERS] Re: [SQL] Functional Indexes