X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 73F989DCC4A for ; Wed, 1 Mar 2006 16:35:33 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 89103-01 for ; Wed, 1 Mar 2006 16:35:34 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 4A1899DC9CF for ; Wed, 1 Mar 2006 16:35:31 -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 k21KZSbl014929; Wed, 1 Mar 2006 15:35:28 -0500 (EST) To: Hannu Krosing cc: Bruce Momjian , Stephan Szabo , "Milen A. Radev" , pgsql-sql@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [SQL] Interval subtracting In-reply-to: <1141244920.3737.10.camel@localhost.localdomain> References: <200603012018.k21KIhi22006@candle.pha.pa.us> <1141244920.3737.10.camel@localhost.localdomain> Comments: In-reply-to Hannu Krosing message dated "Wed, 01 Mar 2006 22:28:39 +0200" Date: Wed, 01 Mar 2006 15:35:28 -0500 Message-ID: <14928.1141245328@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.111 required=5 tests=[AWL=0.111] X-Spam-Score: 0.111 X-Spam-Level: X-Archive-Number: 200603/55 X-Sequence-Number: 80453 Hannu Krosing writes: > But unfortunately '2 mons -1 days' <> '1 mons 29 days' > If I want something to happen 1 day less than two months from dome date, > then the only way to say that consistently *is* '2 mons -1 days'. Sure, but if you want to represent that then you don't pass the value through justify_days(). The entire premise of justify_days() is that 1 month is interchangeable with 30 days and we should try to make the value "look nice" given that assumption. I think everyone's independently arrived at the same thought that justify_days should not produce a result with different signs for month and day (except for the case with month = 0, per my last message). regards, tom lane