From: Tom Lane <tgl@sss.pgh.pa.us>
To: Herouth Maoz <herouth@oumail.openu.ac.il>
Cc: vikrant@chemquick.com
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Mail about typecast
Date: Tue, 15 Jun 1999 10:07:17 -0400
Message-ID: <22648.929455637@sss.pgh.pa.us> (raw)
In-Reply-To: <l03130303b38c0b05f018@[147.233.159.109]>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, herouth@oumail.openu.ac.il, vikrant@chemquick.com
Subject: Re: [SQL] Mail about typecast
In-Reply-To: <22648.929455637@sss.pgh.pa.us>
References: <l03130303b38c0b05f018@[147.233.159.109]> <22648.929455637@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox