Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwEjP-00059h-AO for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jul 2020 01:00:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jwEjN-0003W6-Vn for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jul 2020 01:00:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwEjN-0003Vv-PI for pgsql-hackers@lists.postgresql.org; Fri, 17 Jul 2020 01:00:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwEjI-0008Jz-Rw for pgsql-hackers@lists.postgresql.org; Fri, 17 Jul 2020 01:00:05 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 06H0xvrJ3506769; Thu, 16 Jul 2020 20:59:57 -0400 From: Tom Lane To: Dean Rasheed cc: PostgreSQL Hackers Subject: Re: Wrong results from in_range() tests with infinite offset In-reply-to: References: <3393130.1594925893@sss.pgh.pa.us> <3464257.1594936216@sss.pgh.pa.us> Comments: In-reply-to Dean Rasheed message dated "Fri, 17 Jul 2020 00:47:14 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3506767.1594947597.1@sss.pgh.pa.us> Date: Thu, 16 Jul 2020 20:59:57 -0400 Message-ID: <3506768.1594947597@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Dean Rasheed writes: > On Thu, 16 Jul 2020, 22:50 Tom Lane, wrote: >> Actually, after staring at those results awhile longer, I decided >> they were wrong. The results shown here seem actually sane --- >> for instance, -Infinity shouldn't "infinitely precede" itself, >> I think. (Maybe if you got solipsistic enough you could argue >> that that is valid, but it seems pretty bogus.) > Hmm, that code looks a bit fishy to me, but I really need to think about it > some more. I'll take another look tomorrow, and maybe it'll become clearer. It's certainly verbose, so I'd like to find a more concise way to write the logic. But the v2 results seem right. regards, tom lane