Re: Comments on Exclusion Constraints and related datatypes - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Comments on Exclusion Constraints and related datatypes
Date
Msg-id 407d949e1003221246s512602ddo11ba29de551e4cb8@mail.gmail.com
Whole thread Raw
In response to Comments on Exclusion Constraints and related datatypes  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Comments on Exclusion Constraints and related datatypes
List 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


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Comments on Exclusion Constraints and related datatypes
Next
From: Simon Riggs
Date:
Subject: Re: Comments on Exclusion Constraints and related datatypes