| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Ron <ronljohnsonjr(at)gmail(dot)com> |
| Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: "two time periods with only an endpoint in common do not overlap" ??? |
| Date: | 2021-10-15 14:01:20 |
| Message-ID: | 953559.1634306480@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Ron <ronljohnsonjr(at)gmail(dot)com> writes:
> On 10/14/21 7:02 PM, Adrian Klaver wrote:
>> SELECT (DATE '2001-10-29', DATE '2001-10-30') OVERLAPS
>> (DATE '2001-10-30', DATE '2001-10-31');
>> Result: false
> Why /don't/ they overlap, given that they share a common date?
They don't. Per the fine manual [1]:
Each time period is considered to represent the half-open interval
start <= time < end, unless start and end are equal in which case it
represents that single time instant. This means for instance that two
time periods with only an endpoint in common do not overlap.
regards, tom lane
[1] https://www.postgresql.org/docs/current/functions-datetime.html
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zwettler Markus (OIZ) | 2021-10-15 15:32:25 | postgres ssl client certificate authentification |
| Previous Message | Adrian Klaver | 2021-10-15 13:59:01 | Re: "two time periods with only an endpoint in common do not overlap" ??? |