pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Ron <ronljohnsonjr@gmail.com>
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: "two time periods with only an endpoint in common do not overlap" ???
Date: Sat, 16 Oct 2021 09:24:44 -0700
Message-ID: <4ad064ba-1650-cefd-2c44-db909937f90a@aklaver.com> (raw)
In-Reply-To: <bb79ff9e-acee-c73d-3379-bea13db377b9@gmail.com>
References: <820B633E-90C6-40F0-81A0-CAA074E5762F@yugabyte.com>
	<2ff5f521-34ab-8690-180a-864441e4f15b@aklaver.com>
	<0782c52d-2a80-b37f-0b9e-1a2a7cfb68c5@gmail.com>
	<98ea7ea3-38ac-d145-e668-803e5ea14de7@aklaver.com>
	<d496d507-8abd-7e11-8e82-0f2983641803@gmail.com>
	<CAJ2+uGWsa0kZH2zvfBADMo=qy9UJC4aMuHLgQyVHMZyGFx==QQ@mail.gmail.com>
	<6f61f1d3-c110-e6dd-d742-1bb45fb6e90e@gmail.com>
	<e4c9e650-8361-8f8e-2357-e4919e2ed8d7@aklaver.com>
	<bb79ff9e-acee-c73d-3379-bea13db377b9@gmail.com>

On 10/15/21 21:54, Ron wrote:

>>
>>
>> There is no straight time range, you would have to use tsrange or 
>> tstzrange. The principle still holds though you can make ranges 
>> overlap or not depending on '[)' or '[]'.
> 
> OP refers to the OVERLAP operator (is it an operator), not the tsrange() 
> function.
> 

Your statement was:

"The numeric ranges 0-10 and 10-19 overlap, just as the time ranges 
00:01:00-00:00:02:00 overlaps 00:02:00-00:03:00."

I was just pointing out that is not necessarily true. As was pointed out 
upstream there are good reasons for not having 1:00-2:00 and 2:00-3:00 
overlap.

As David pointed out it is about following the documented behavior. I 
still have to remember, on occasion, that BETWEEN actually includes the 
end points not just points in between them.

-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (24+ messages)  latest in thread

Message-ID: <4ad064ba-1650-cefd-2c44-db909937f90a@aklaver.com>
Permalink:  ../4ad064ba-1650-cefd-2c44-db909937f90a@aklaver.com/
Also on:    postgresql.org/message-id/4ad064ba-1650-cefd-2c44-db909937f90a@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, ronljohnsonjr@gmail.com
  Subject: Re: "two time periods with only an endpoint in common do not overlap" ???
  In-Reply-To: <4ad064ba-1650-cefd-2c44-db909937f90a@aklaver.com>
  References: <820B633E-90C6-40F0-81A0-CAA074E5762F@yugabyte.com> <2ff5f521-34ab-8690-180a-864441e4f15b@aklaver.com> <0782c52d-2a80-b37f-0b9e-1a2a7cfb68c5@gmail.com> <98ea7ea3-38ac-d145-e668-803e5ea14de7@aklaver.com> <d496d507-8abd-7e11-8e82-0f2983641803@gmail.com> <CAJ2+uGWsa0kZH2zvfBADMo=qy9UJC4aMuHLgQyVHMZyGFx==QQ@mail.gmail.com> <6f61f1d3-c110-e6dd-d742-1bb45fb6e90e@gmail.com> <e4c9e650-8361-8f8e-2357-e4919e2ed8d7@aklaver.com> <bb79ff9e-acee-c73d-3379-bea13db377b9@gmail.com> <4ad064ba-1650-cefd-2c44-db909937f90a@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox