Re: "two time periods with only an endpoint in common do not overlap" ???

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: "two time periods with only an endpoint in common do not overlap" ???
Дата
Msg-id 953559.1634306480@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: "two time periods with only an endpoint in common do not overlap" ???  (Ron <ronljohnsonjr@gmail.com>)
Список pgsql-general
Ron <ronljohnsonjr@gmail.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



В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: "two time periods with only an endpoint in common do not overlap" ???
Следующее
От: "Zwettler Markus (OIZ)"
Дата:
Сообщение: postgres ssl client certificate authentification