Prev: ALTER TABLE .... make constraint DEFERRABLE
Next: pgsql: Prevent the injection of invalidly encodedstrings by PL/Python
From: Alvaro Herrera on 22 Mar 2010 15:04 David Fetter wrote: > diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml > index 9881ff4..9313112 100644 > --- a/doc/src/sgml/func.sgml > +++ b/doc/src/sgml/func.sgml > @@ -7134,7 +7134,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple > </row> > <row> > <entry> <literal>&&</literal> </entry> > - <entry>Overlaps?</entry> > + <entry>Overlaps? One point in common makes this true.</entry> > <entry><literal>box '((0,0),(1,1))' && box '((0,0),(2,2))'</literal></entry> > </row> > <row> Hmm, how does this look in horizontal space? (The <row> makes me think it's a table.) -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Simon Riggs on 22 Mar 2010 16:02
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 <david(a)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(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |