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 1mbAYt-0004WZ-Q6 for pgsql-general@arkaria.postgresql.org; Thu, 14 Oct 2021 23:54:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mbAYs-000320-Lr for pgsql-general@arkaria.postgresql.org; Thu, 14 Oct 2021 23:54:58 +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 1mbAYs-00031r-CK for pgsql-general@lists.postgresql.org; Thu, 14 Oct 2021 23:54:58 +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 1mbAYq-0000C4-Bs for pgsql-general@lists.postgresql.org; Thu, 14 Oct 2021 23:54:58 +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 19ENssFc911808; Thu, 14 Oct 2021 19:54:54 -0400 From: Tom Lane To: Bryn Llewellyn cc: pgsql-general list Subject: Re: "two time periods with only an endpoint in common do not overlap" ??? In-reply-to: <820B633E-90C6-40F0-81A0-CAA074E5762F@yugabyte.com> References: <820B633E-90C6-40F0-81A0-CAA074E5762F@yugabyte.com> Comments: In-reply-to Bryn Llewellyn message dated "Thu, 14 Oct 2021 16:38:38 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <911806.1634255694.1@sss.pgh.pa.us> Date: Thu, 14 Oct 2021 19:54:54 -0400 Message-ID: <911807.1634255694@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bryn Llewellyn writes: > I tried this obvious test (using Version 13.4): > with c as ( > select > '2000-01-15'::timestamp as start_1, > '2000-02-15'::timestamp as start_2, > '2000-03-15'::timestamp as common_endpoint) > select ( > (start_1, common_endpoint) overlaps > (start_2, common_endpoint) > )::text > from c; > The result is "true". Seems to me that the doc is therefore wrong Huh? Those intervals have lots of points in common, not only a single point. The documentation is referring to a case like your second example. regards, tom lane