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 39359329EAD for ; Tue, 21 Sep 2004 08:40:13 +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 94273-02 for ; Tue, 21 Sep 2004 07:40:07 +0000 (GMT) Received: from fw1.mailpen.net (fw1.mailpen.net [66.13.45.202]) by svr1.postgresql.org (Postfix) with ESMTP id A770B329E41 for ; Tue, 21 Sep 2004 08:40:07 +0100 (BST) Received: from TpA22p1.ultimeth.com (TpA22p1.internal.mailpen.net [192.168.128.199]) (using SSLv3 with cipher DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by fw1.mailpen.net (Postfix) with ESMTP id 7F1DE31C01F for ; Tue, 21 Sep 2004 00:40:06 -0700 (PDT) Message-Id: <5.1.0.14.2.20040921003212.00a958d8@postgresql3.ultimeth.com> X-Sender: mailer@postgresql3.ultimeth.com (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 21 Sep 2004 00:38:59 -0700 To: pgsql-sql@postgresql.org From: "Dean Gibson (DB Administrator)" Subject: Difference in DATEs Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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/183 X-Sequence-Number: 19029 Assume that x and y are of type DATE: 1. AGE( x, y ) < INTERVAL '...' works. 2. x < y + INTERVAL '...' works. 3. x - y < INTERVAL '...' doesn't work (but then, the minus operator is not defined in the manual for two DATE values). Question: Is the meaning of x - y well-defined? That is, is there a definition that I can count on? Not an important question, but I'm curious, since I like to write date differences in a style that makes readability/maintenance easy. -- Dean