X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 99246DB1D0 for ; Thu, 10 Nov 2005 15:13:49 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 04194-05 for ; Thu, 10 Nov 2005 19:13:47 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1E22FDB1AC for ; Thu, 10 Nov 2005 15:13:47 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id jAAJDhM4011041; Thu, 10 Nov 2005 14:13:43 -0500 (EST) To: Michael Fuhr Cc: Rod Taylor , Judith Altamirano Figueroa , pgsql-sql@postgresql.org Subject: Re: time In-reply-to: <20051110182139.GA87715@winnie.fuhr.org> References: <1131635035.3529.143.camel@Desarrollo> <1131646287.819.144.camel@home> <20051110182139.GA87715@winnie.fuhr.org> Comments: In-reply-to Michael Fuhr message dated "Thu, 10 Nov 2005 11:21:39 -0700" Date: Thu, 10 Nov 2005 14:13:43 -0500 Message-ID: <11040.1131650023@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.006 required=5 tests=[AWL=0.006] X-Spam-Score: 0.006 X-Spam-Level: X-Archive-Number: 200511/95 X-Sequence-Number: 23346 Michael Fuhr writes: > Am I missing something? Is there a reason not to simply cast the > timestamp value to time? > test=> select now()::time; > now > ----------------- > 11:19:19.892125 > (1 row) > test=> select cast(now() as time); > now > ----------------- > 11:19:19.892125 > (1 row) I think the OP was trying to use the functional cast syntax time(now()) which worked long ago, but has not since we added the SQL-spec time precision syntax. regards, tom lane