From: | Павел Лучин <ddiamondbbackk(at)gmail(dot)com> |
---|---|
To: | Павел Лучин <ddiamondbbackk(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #16747: Unexpected behaviour of the overlaps function |
Date: | 2020-11-26 16:21:06 |
Message-ID: | CAH2e_OjF7=0pWkMReqpbS2SdmMXCh7MmWfMSn8Bmx_X7hh8S+g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
How can I avoid half-open interval behavior?
I can not find any examples in the documentation...
чт, 26 нояб. 2020 г. в 17:25, PG Bug reporting form <noreply(at)postgresql(dot)org
>:
> The following bug has been logged on the website:
>
> Bug reference: 16747
> Logged by: Paul Luchyn
> Email address: ddiamondbbackk(at)gmail(dot)com
> PostgreSQL version: 11.8
> Operating system: Windows
> Description:
>
> Hello!
>
> I'm working with the "overlaps" function.
> In my humble opinion it works incorrectly in one case.
> I have prepared some examples.
>
> 1) Two intervals with zero duration: SELECT (TIMESTAMP '2020-11-29
> 12:00:00.000', TIMESTAMP '2020-11-29 12:00:00.000') OVERLAPS (TIMESTAMP
> '2020-11-29 12:00:00.000', TIMESTAMP '2020-11-29 12:00:00.000'); ,the
> result
> is "true", looks fine.
> 2) Interval with zero duration, and non-zero interval: SELECT (TIMESTAMP
> '2020-11-29 12:00:00.000', TIMESTAMP '2020-11-29 12:00:00.000') OVERLAPS
> (TIMESTAMP '2020-11-29 12:00:00.000', TIMESTAMP '2020-11-29 12:02:00.000');
> ,the result is "true", looks fine.
> 3) Two intervals with non-zero duration: SELECT (TIMESTAMP '2020-11-29
> 12:00:00.000', TIMESTAMP '2020-11-29 12:01:00.000') OVERLAPS (TIMESTAMP
> '2020-11-29 12:01:00.000', TIMESTAMP '2020-11-29 12:02:00.000'); , the
> result is false. The last case looks suspicious: logically these two
> intervals don't overlap, but they have common moment of time (2020-11-29
> 12:01:00.000).
>
> And one more question: is there any other function which will do the trick
> in the situation described in the last example?
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Павел Лучин | 2020-11-26 16:26:05 | Re: BUG #16747: Unexpected behaviour of the overlaps function |
Previous Message | David G. Johnston | 2020-11-26 16:04:53 | Re: BUG #16747: Unexpected behaviour of the overlaps function |