Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xsyp7-0003Ae-5D for pgsql-bugs@arkaria.postgresql.org; Mon, 24 Nov 2014 18:57:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xsyp6-00013F-4E for pgsql-bugs@arkaria.postgresql.org; Mon, 24 Nov 2014 18:57:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xsyp4-000136-6A for pgsql-bugs@postgresql.org; Mon, 24 Nov 2014 18:57:18 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xsyp0-0000w0-Kt for pgsql-bugs@postgresql.org; Mon, 24 Nov 2014 18:57:16 +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 sAOIvBNU017170; Mon, 24 Nov 2014 13:57:11 -0500 From: Tom Lane To: presnypreklad@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #12046: lower_inf('(-infinity, today)'::tsrange) returns false In-reply-to: <20141124113406.15510.64160@wrigleys.postgresql.org> References: <20141124113406.15510.64160@wrigleys.postgresql.org> Comments: In-reply-to presnypreklad@gmail.com message dated "Mon, 24 Nov 2014 11:34:06 +0000" Date: Mon, 24 Nov 2014 13:57:11 -0500 Message-ID: <17169.1416855431@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 presnypreklad@gmail.com writes: > In the course of writing a program that accepts tsrange literals from the > user, which are then plugged into various SQL queries, today I was testing > some tsranges to see how they are interpreted by PostgreSQL 9.3.5. > This one, in particular, behaves strangely: '(-infinity,today)'::tsrange > The lower_inf function says the lower bound is not infinite (!) This is not surprising: the range stuff has its own notion of "infinite bounds", which has nothing to do with any infinity concept that the underlying datatype may or may not have. Trying to unify those concepts would greatly complicate the interface between ranges and their component datatypes, without actually buying very much AFAICS. 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