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 254469DC821 for ; Wed, 1 Mar 2006 16:46:48 -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 90307-07 for ; Wed, 1 Mar 2006 16:46: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 CD9659DC87E for ; Wed, 1 Mar 2006 16:46:45 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 5615630972; Wed, 1 Mar 2006 21:46:47 +0100 (MET) From: Mark Dilger X-Newsgroups: pgsql.hackers Subject: Re: [SQL] Interval subtracting Date: Wed, 01 Mar 2006 12:46:12 -0800 Organization: Hub.Org Networking Services Lines: 22 Message-ID: <44060814.8030604@markdilger.com> References: <200603012018.k21KIhi22006@candle.pha.pa.us> <1141244920.3737.10.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org To: Hannu Krosing User-Agent: Mozilla Thunderbird 1.0 (X11/20050130) X-Accept-Language: en-us, en In-Reply-To: <1141244920.3737.10.camel@localhost.localdomain> 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.098 required=5 tests=[AWL=0.098] X-Spam-Score: 0.098 X-Spam-Level: X-Archive-Number: 200603/57 X-Sequence-Number: 80455 Hannu Krosing wrote: > 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'. Correct me if I am wrong, but I thought that justify_days would only be called if the user wanted it. I get the following behavior in psql even after the patch is applied: select '2 mons -1 days'::interval; interval ---------------- 2 mons -1 days So there does not seem to be any justification going on without the user's permission. Consequently, if you need '2 mons -1 days', don't call justify_days. Am I missing something? mark