Re: BUG #6192: Incorrect result from operator "overlaps"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Incorrect result from operator " overlaps "" <wolfmoon(at)o2(dot)pl>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6192: Incorrect result from operator "overlaps"
Date: 2011-09-01 15:39:19
Message-ID: 10338.1314891559@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Incorrect result from operator "overlaps"" <wolfmoon(at)o2(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message farta 2011-09-01 16:57:33 BUG #6193: The one-click installer failed to unpack
Previous Message Vik Reykja 2011-09-01 15:31:58 Re: BUG #6192: Incorrect result from operator "overlaps"