Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [206.210.65.6]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA23124 for ; Tue, 15 Jun 1999 10:10:15 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA22650; Tue, 15 Jun 1999 10:07:17 -0400 (EDT) To: Herouth Maoz cc: vikrant@chemquick.com, pgsql-sql@postgreSQL.org Subject: Re: [SQL] Mail about typecast In-reply-to: Your message of Tue, 15 Jun 1999 16:52:41 +0300 Date: Tue, 15 Jun 1999 10:07:17 -0400 Message-ID: <22648.929455637@sss.pgh.pa.us> From: Tom Lane Herouth Maoz 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