Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXHTX-00087a-00 for pgsql-bugs@arkaria.postgresql.org; Wed, 02 Sep 2015 23:29:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZXHTW-0001v8-Er for pgsql-bugs@arkaria.postgresql.org; Wed, 02 Sep 2015 23:29:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZXHSt-0000X8-7u for pgsql-bugs@postgresql.org; Wed, 02 Sep 2015 23:29:15 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZXHSq-0001Q4-Mq for pgsql-bugs@postgresql.org; Wed, 02 Sep 2015 23:29:14 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t82NT9Gw021536; Wed, 2 Sep 2015 19:29:09 -0400 From: Tom Lane To: robert.kruus@gov.sk.ca cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13608: 3 argument range constructor functions In-reply-to: <20150902220316.1354.64214@wrigleys.postgresql.org> References: <20150902220316.1354.64214@wrigleys.postgresql.org> Comments: In-reply-to robert.kruus@gov.sk.ca message dated "Wed, 02 Sep 2015 22:03:16 -0000" Date: Wed, 02 Sep 2015 19:29:09 -0400 Message-ID: <21535.1441236549@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org robert.kruus@gov.sk.ca writes: > The int4range, int8range, daterange functions seem to be ignoring the 3rd > argument which specifies the interval bounds. > i.e. > SELECT daterange('2010-01-01'::date, '2011-01-01'::date, '()'::text); > daterange > ------------------------- > [2010-01-02,2011-01-02) It's not ignoring it. What it's doing is canonicalizing the range so that equivalent ranges actually look the same. Note your bounds have changed. (BTW, you misquoted the result; the upper date does not change in this case, at least not for me.) See the discussion of discrete vs continuous range types at http://www.postgresql.org/docs/9.3/static/rangetypes.html#RANGETYPES-DISCRETE regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs