Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group