Обсуждение: Inconsistency in docs for OVERLAPS

Поиск
Список
Период
Сортировка

Inconsistency in docs for OVERLAPS

От
Jim Nasby
Дата:
Per 8.3 and 8.4 docs:

"In addition to these functions, the SQL OVERLAPS operator is supported:

(start1, end1) OVERLAPS (start2, end2)
(start1, length1) OVERLAPS (start2, length2)
This expression yields true when two time periods (defined by their endpoints) overlap, false when they do not overlap.
Theendpoints can be specified as pairs of dates, times, or time stamps; or as a date, time, or time stamp followed by
aninterval." 

So we accept (datetime,datetime) OVERLAPS (datetime,datetime) or (datetime,interval) OVERLAPS (datetime,interval)

However, the example shows yet another case:

"SELECT (DATE '2001-02-16', DATE '2001-12-21') OVERLAPS

       (DATE '2001-10-30', DATE '2002-10-30');

Result: true

SELECT (DATE '2001-02-16', INTERVAL '100 days')
OVERLAPS

       (DATE '2001-10-30', DATE '2002-10-30');

Result: false

And in reality, (timestamp, interval) OVERLAPS (timestamp, timestamp) does work, first part of this is incomplete.
--
Jim C. Nasby, Database Architect                   jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net