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 61C4A9DC822 for ; Wed, 1 Mar 2006 19:08:14 -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 28038-09 for ; Wed, 1 Mar 2006 19:08:16 -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 498EB9DC809 for ; Wed, 1 Mar 2006 19:08:11 -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 k21N7gGf016751; Wed, 1 Mar 2006 18:07:42 -0500 (EST) To: Bruce Momjian cc: Mark Dilger , pgsql-hackers@postgresql.org Subject: Re: [SQL] Interval subtracting In-reply-to: <200603012302.k21N2Hm04879@candle.pha.pa.us> References: <200603012302.k21N2Hm04879@candle.pha.pa.us> Comments: In-reply-to Bruce Momjian message dated "Wed, 01 Mar 2006 18:02:17 -0500" Date: Wed, 01 Mar 2006 18:07:42 -0500 Message-ID: <16750.1141254462@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/79 X-Sequence-Number: 80477 Bruce Momjian writes: > Tom Lane wrote: >> Based on that, I guess I have to change my vote: justify_hours should >> still not look at the month (because it shouldn't use the month=30days >> assumption), but justify_days should be changed to be effectively a >> combination of both functions --- that is, it should fix all three >> fields using both the 30days and the 24hours assumptions. Then it could >> guarantee that all come out with the same sign. > If we do that, we should just call it justify_interval(). I am thinking > this is the direction to go, and for people who want more control they > use the justify_hours and justify_days, and those are left unchanged. Well, the question is whether justify_days has a sane definition that is different from this. Based on your example, I'm not seeing one. regards, tom lane