Re: [SQL] Mail about typecast - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] Mail about typecast
Date
Msg-id 22648.929455637@sss.pgh.pa.us
Whole thread Raw
In response to Re: [SQL] Mail about typecast  (Herouth Maoz <herouth@oumail.openu.ac.il>)
List pgsql-sql
Herouth Maoz <herouth@oumail.openu.ac.il> writes:
> At 16:39 +0300 on 15/06/1999, Tom Lane wrote:
>> select date_part('epoch','12 hours'::timespan) AS float4;

> Probably missing a CAST keyword here, isn't it?

My mistake, this should have been

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

(the parens are required too).  The first way just relabels the
output column, it doesn't actually change the datatype :-(
        regards, tom lane


pgsql-sql by date:

Previous
From: Herouth Maoz
Date:
Subject: Re: [SQL] Mail about typecast
Next
From: "Arendt, Volker"
Date:
Subject: subscribe pgsql-sql