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 558ED329E60 for ; Tue, 21 Sep 2004 15:01:28 +0100 (BST) 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 28705-09 for ; Tue, 21 Sep 2004 14:01:23 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9C5A1329E42 for ; Tue, 21 Sep 2004 15:01:26 +0100 (BST) 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 i8LE1MXA000387; Tue, 21 Sep 2004 10:01:26 -0400 (EDT) To: "Dean Gibson (DB Administrator)" Cc: pgsql-sql@postgresql.org Subject: Re: Difference in DATEs In-reply-to: <5.1.0.14.2.20040921003212.00a958d8@postgresql3.ultimeth.com> References: <5.1.0.14.2.20040921003212.00a958d8@postgresql3.ultimeth.com> Comments: In-reply-to "Dean Gibson (DB Administrator)" message dated "Tue, 21 Sep 2004 00:38:59 -0700" Date: Tue, 21 Sep 2004 10:01:22 -0400 Message-ID: <386.1095775282@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/188 X-Sequence-Number: 19034 "Dean Gibson (DB Administrator)" writes: > 3. x - y < INTERVAL '...' doesn't work (but then, the minus operator is not > defined in the manual for two DATE values). Sure it is: see 10th row in http://www.postgresql.org/docs/7.4/static/functions-datetime.html#OPERATORS-DATETIME-TABLE Forget the interval and compare to an integer. regards, tom lane