Re: [SQL] Mail about typecast

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: vikrant(at)chemquick(dot)com
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] Mail about typecast
Date: 1999-06-15 13:39:56
Message-ID: 22557.929453996@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Vikrant Rathore <vikrant(at)chemquick(dot)com> writes:
> select date_part('epoch','12 hours'::timespan)::float4;
> ERROR: function dtof(float8) does not exist

What Postgres version are you using? The above query appears to work
fine in both 6.4.2 and 6.5. I'm guessing you are getting bit by some
bug in an older release ...

If you don't want to update, you might also try the variant forms

select float4(date_part('epoch','12 hours'::timespan));
select date_part('epoch','12 hours'::timespan) AS float4;

regards, tom lane

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Herouth Maoz 1999-06-15 13:52:41 Re: [SQL] Mail about typecast
Previous Message José Soares 1999-06-15 12:42:03 Re: [SQL] Mail about typecast