Re: BUG #6192: Incorrect result from operator "overlaps" - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6192: Incorrect result from operator "overlaps"
Date
Msg-id 10338.1314891559@sss.pgh.pa.us
Whole thread Raw
In response to BUG #6192: Incorrect result from operator "overlaps"  ("Incorrect result from operator "overlaps"" <wolfmoon@o2.pl>)
List pgsql-bugs
"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

pgsql-bugs by date:

Previous
From: Vik Reykja
Date:
Subject: Re: BUG #6192: Incorrect result from operator "overlaps"
Next
From: "farta"
Date:
Subject: BUG #6193: The one-click installer failed to unpack