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

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: "two time periods with only an endpoint in common do not overlap" ???
Дата
Msg-id 4ad064ba-1650-cefd-2c44-db909937f90a@aklaver.com
обсуждение исходный текст
Ответ на Re: "two time periods with only an endpoint in common do not overlap" ???  (Ron <ronljohnsonjr@gmail.com>)
Список pgsql-general
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



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Wrong sorting on docker image
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Wrong sorting on docker image