X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C3973476381 for ; Fri, 2 May 2003 10:57:13 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 01B8D476380 for ; Fri, 2 May 2003 10:57:13 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h42EvHU6010506; Fri, 2 May 2003 10:57:17 -0400 (EDT) To: Rajesh Kumar Mallah Cc: pgsql-sql@postgresql.org Subject: Re: timeofday() and now() issue.. In-reply-to: <200305021844.35194.mallah@trade-india.com> References: <200305021844.35194.mallah@trade-india.com> Comments: In-reply-to Rajesh Kumar Mallah message dated "Fri, 02 May 2003 18:44:35 +0530" Date: Fri, 02 May 2003 10:57:17 -0400 Message-ID: <10505.1051887437@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-29.1 required=5.0 tests=BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/25 X-Sequence-Number: 13190 Rajesh Kumar Mallah writes: > SELECT CAST (timeofday() as timestamp with time zone) - CAST (now() as timestamp with time zone); > shudn't it return something close to 0 ? Works for me ... what's your platform, PG version, and timezone? And what are you getting from the intermediate steps in that expression? regards, tom lane