Re: Why overlaps is not working

Поиск
Список
Период
Сортировка
От Andrus
Тема Re: Why overlaps is not working
Дата
Msg-id eiviju$edk$1@news.hub.org
обсуждение исходный текст
Ответ на Re: Why overlaps is not working  (Matthias.Pitzl@izb.de)
Ответы Re: Why overlaps is not working
Список pgsql-general
> Why not just subtract/add 1, so that the check includes the boundary
> dates?
>
> Like so;
>  select 1 where ('2006-10-31'::date -1, '9999-12-31'::date +1) OVERLAPS
>    ('2006-10-16'::DATE -1, '2006-10-31':: DATE +1)

Alban,

thank you. I use only dates as OVERLAPS arguments.
I changed all my WHERE clauses from

WHERE (a,b) OVERLAPS (c,d)

to

WHERE (a-1,b+1) OVERLAPS (c-1,d+1)

Will this give correct results ?

Andrus.



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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: ROWTYPE initialization question
Следующее
От: "Shoaib Mir"
Дата:
Сообщение: Re: 8.1.2 postmaster died