From: Tom Lane <tgl@sss.pgh.pa.us>
To: Incorrect result from operator " overlaps " <wolfmoon@o2.pl>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6192: Incorrect result from operator "overlaps"
Date: Thu, 01 Sep 2011 11:39:19 -0400
Message-ID: <10338.1314891559@sss.pgh.pa.us> (raw)
In-Reply-To: <201109010827.p818RRBg059211@wwwmaster.postgresql.org>
References: <201109010827.p818RRBg059211@wwwmaster.postgresql.org>
"Incorrect result from operator "overlaps"" <wolfmoon@o2.pl> writes:
> SELECT ('2011-08-31'::date,'2011-08-31'::date) overlaps
> ('2011-08-1'::date,'2011-08-31'::date);
> Returns false, should return true.
This is correct per SQL standard. The spec is written such that an
interval is considered half-open, ie ['2011-08-01', '2011-08-31').
So that does not overlap the point '2011-08-31'.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, wolfmoon@o2.pl
Subject: Re: BUG #6192: Incorrect result from operator "overlaps"
In-Reply-To: <10338.1314891559@sss.pgh.pa.us>
References: <201109010827.p818RRBg059211@wwwmaster.postgresql.org> <10338.1314891559@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox