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 EFC329DC988 for ; Wed, 1 Mar 2006 21:18:45 -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 51727-01 for ; Wed, 1 Mar 2006 21:18:49 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 6295F9DC93C for ; Wed, 1 Mar 2006 21:18:43 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 097A730BE1; Thu, 2 Mar 2006 02:18:46 +0100 (MET) From: Mark Dilger X-Newsgroups: pgsql.hackers Subject: Re: [SQL] Interval subtracting Date: Wed, 01 Mar 2006 17:18:12 -0800 Organization: Hub.Org Networking Services Lines: 21 Message-ID: <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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org To: Tom Lane User-Agent: Mozilla Thunderbird 1.0 (X11/20050130) X-Accept-Language: en-us, en In-Reply-To: <17752.1141259857@sss.pgh.pa.us> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime To: pgsql-hackers@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.101 required=5 tests=[AWL=0.101] X-Spam-Score: 0.101 X-Spam-Level: X-Archive-Number: 200603/91 X-Sequence-Number: 80489 Tom Lane wrote: > Mark Dilger writes: > >>Tom Lane wrote: >> >>>If so, one function or the other is cheating. > > >>That depends what you mean by cheating. The justify_hours function >>looks to see what answer justify_days would give, but does not >>actually change the data. I described this all earlier and I still >>don't see why there is anything wrong with it. > > > 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.