Re: Comments on Exclusion Constraints and related datatypes
Greg Stark <gsstark@mit.edu>
From: Greg Stark <gsstark@mit.edu>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Date: 2010-03-22T19:46:54Z
Lists: pgsql-hackers
On Mon, Mar 22, 2010 at 1:15 PM, Simon Riggs <simon@2ndquadrant.com> wrote: > > * Circles, Boxes and other geometric datatypes defined "overlaps" to > include touching shapes. So > > * inet datatypes don't have a commutative operator on which a unique > index can be built. There is no "overlaps" equivalent, which again is a > shame because that stops them being used with the new feature. I think our unusual data types are one of the strong points of Postgres but they're missing a lot of operators and opclasses to make them really useful. There's no reason we couldn't have separate overlaps and overlaps-internally operators just like we have <=,>= and <,>. And it would be nice to flesh out the network data type more fully, perhaps merging in as much of ip4r as makes sense. I remember when I tried to use geometric data types I was stymied by missing operators. In particular I was surprised that point <in> box wasn't a gist indexable method. I think that particular case has been addressed but I think there are many more like it. -- greg