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 EA8479DCBE3 for ; Thu, 2 Mar 2006 10:50:02 -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 80356-10 for ; Thu, 2 Mar 2006 10:50:06 -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 E74ED9DCBBD for ; Thu, 2 Mar 2006 10:49:59 -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 k22EnW6w002477; Thu, 2 Mar 2006 09:49:32 -0500 (EST) To: Mark Dilger cc: pgsql-hackers@postgreSQL.org Subject: Re: [SQL] Interval subtracting In-reply-to: <440647D4.9060601@markdilger.com> References: <200603012326.k21NQOv08610@candle.pha.pa.us> <4406331A.6080307@markdilger.com> <17317.1141257505@sss.pgh.pa.us> <44063632.20505@markdilger.com> <17752.1141259857@sss.pgh.pa.us> <440647D4.9060601@markdilger.com> Comments: In-reply-to Mark Dilger message dated "Wed, 01 Mar 2006 17:18:12 -0800" Date: Thu, 02 Mar 2006 09:49:32 -0500 Message-ID: <2476.1141310972@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/115 X-Sequence-Number: 80513 Mark Dilger writes: > Tom Lane wrote: >> The problem is that you can't determine "what answer justify_days would >> give" without using the assumption "1 month == 30 days", which is an >> assumption that justify_hours must not depend on. > Ahhh. So the fact that justify_days already makes the 1 month == 30 days > assumption is ok in that function but can't be propagated to justify_hours. Right. I don't want us to define things so that none of this functionality is available in situations where the 30-day assumption is untenable. justify_hours can still do something useful (ie, trim oversize hours fields) without that. justify_interval will probably be the new "normal" way to do things when you are prepared to make both assumptions. I'm not entirely sure about the use-case for justify_days, but seems we ought to keep it for reasons of backwards compatibility. regards, tom lane