On Mon, 2010-03-22 at 10:55 -0700, David Fetter wrote: > On Mon, Mar 22, 2010 at 01:46:51PM -0400, Tom Lane wrote: > > David Fetter <da...@fetter.org> writes: > > > I'm seeing a lot of places where this might be documented. Any ideas > > > as to which ones are appropriate? > > > > I would think "Geometric Functions and Operators" would be the most > > appropriate spot ... > > Please find patch enclosed. :)
I think you've missed my point. I don't suppose anybody would disagree that box '((0,0),(1,1))' && box '((0,0),(2,2))' is true. The fact that these two boxes share the point (0,0) has nothing to do with the obvious fact that the larger box completely contains the smaller one. What I was talking about was that box '((0,0),(1,1))' && box '((1,1),(2,2))' returns true, even though they touch at only a single point, and share zero area. Perhaps the end result here is the realisation that a normal search operator like overlaps (&&) might not be the right operator to use for exclusion constraints. For the latter, we might want something that defines the left and bottom edges of a box to belong to the box (>=), whereas the top edges are the boundary but do not belong to the box itself (<). In a timerange that might be easier to visualise: the start timestamp is inclusive, the end timestamp is exclusive, so that each timestamp exists in only one timerange when the timeranges are overlapping with no gaps. -- Simon Riggs www.2ndQuadrant.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers