Re: A Nit RE overlaps

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: A Nit RE overlaps
Дата
Msg-id 14890.1010608717@sss.pgh.pa.us
обсуждение исходный текст
Ответ на A Nit RE overlaps  ("Ian Harding" <ianh@tpchd.org>)
Список pgsql-general
"Ian Harding" <ianh@tpchd.org> writes:
> As it is, it returns false.  To me if the first interval ends at a
> point in time and the other begins at the same point, they overlap.
> This is splitting hairs with a timestamp, but not with a date.  Am I
> the only person who feels this way?

SQL92 says that abutting time intervals don't overlap, if I'm reading
the spec correctly.

For dates, it would seem to me that you want to add 24 hours to the end
of one interval in order to get the behavior you're describing.

> In my twisted little world, a null date would be OK too and would
> indicate the beginning or end of time.

I agree, that's pretty bogus.  Why not use infinity and -infinity?
(okay, they don't exist as DATE values, but they do exist as
timestamp values).

            regards, tom lane

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

Предыдущее
От: tony
Дата:
Сообщение: pg_xsetlog
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Query planner isn't using my indices