Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9AA92B5DBBE for ; Thu, 1 Sep 2011 12:39:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 18141-08 for ; Thu, 1 Sep 2011 15:39:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id BB307B5DBE8 for ; Thu, 1 Sep 2011 12:39:25 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p81FdJo3010339; Thu, 1 Sep 2011 11:39:19 -0400 (EDT) To: "Incorrect result from operator " overlaps "" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6192: Incorrect result from operator "overlaps" In-reply-to: <201109010827.p818RRBg059211@wwwmaster.postgresql.org> References: <201109010827.p818RRBg059211@wwwmaster.postgresql.org> Comments: In-reply-to "Incorrect result from operator "overlaps"" message dated "Thu, 01 Sep 2011 08:27:27 +0000" Date: Thu, 01 Sep 2011 11:39:19 -0400 Message-ID: <10338.1314891559@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/11 X-Sequence-Number: 31028 "Incorrect result from operator "overlaps"" 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