Re: "two time periods with only an endpoint in common do not overlap" ??? - Mailing list pgsql-general

From Tom Lane
Subject Re: "two time periods with only an endpoint in common do not overlap" ???
Date
Msg-id 911807.1634255694@sss.pgh.pa.us
Whole thread Raw
In response to "two time periods with only an endpoint in common do not overlap" ???  (Bryn Llewellyn <bryn@yugabyte.com>)
List pgsql-general
Bryn Llewellyn <bryn@yugabyte.com> 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



pgsql-general by date:

Previous
From: Bryn Llewellyn
Date:
Subject: "two time periods with only an endpoint in common do not overlap" ???
Next
From: Adrian Klaver
Date:
Subject: Re: "two time periods with only an endpoint in common do not overlap" ???