public inbox for [email protected]
help / color / mirror / Atom feedFrom: Jim Nasby <[email protected]>
To: PostgreSQL-documentation <[email protected]>
Subject: Inconsistency in docs for OVERLAPS
Date: Tue, 20 Apr 2010 18:34:00 -0500
Message-ID: <[email protected]> (raw)
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')
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 [email protected]
512.569.9461 (cell) http://jim.nasby.net
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: Inconsistency in docs for OVERLAPS
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox