X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2D03B56410 for ; Mon, 21 Mar 2005 15:01:22 +0000 (GMT) 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 17491-05 for ; Mon, 21 Mar 2005 15:01:12 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 15B0456580 for ; Mon, 21 Mar 2005 15:01:11 +0000 (GMT) Received: (qmail 21182 invoked by uid 500); 21 Mar 2005 15:17:35 -0000 Date: Mon, 21 Mar 2005 09:17:35 -0600 From: Bruno Wolff III To: "Thomas F.O'Connell" Cc: Chandan_Kumaraiah , pgsql-sql@postgresql.org Subject: Re: query Message-ID: <20050321151735.GA20261@wolff.to> Mail-Followup-To: Bruno Wolff III , "Thomas F.O'Connell" , Chandan_Kumaraiah , pgsql-sql@postgresql.org References: <2EB549AAAFEA264FA926269A5BD5E9EB146577@certsrv.satyam.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.01 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/287 X-Sequence-Number: 20766 On Mon, Mar 21, 2005 at 08:33:43 -0600, "Thomas F.O'Connell" wrote: > You should be able to use the CURRENT_DATE function in place of sysdate. > > You might need to cast the 1 explicitly to an interval. > > As in: > > CURRENT_DATE - '1 day'::interval I don't think you want that. That is going to force a conversion from date to a timestamp. You are going to be better off just using: current_date - 1