Inconsistency in docs for OVERLAPS

From: Jim Nasby <decibel(at)decibel(dot)org>
To: PostgreSQL-documentation <pgsql-docs(at)postgresql(dot)org>
Subject: Inconsistency in docs for OVERLAPS
Date: 2010-04-20 23:34:00
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-docs

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. The endpoints can be specified as pairs of dates, times, or time stamps; or as a date, time, or time stamp followed by an interval."

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')

(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(at)nasby(dot)net
512.569.9461 (cell)

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2010-04-20 23:53:36 Re: [HACKERS] Streaming replication document improvements
Previous Message Kevin Grittner 2010-04-20 14:24:38 Re: [HACKERS] Streaming replication document improvements