Re: Index to enforce non-overlapping ranges? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Index to enforce non-overlapping ranges?
Date
Msg-id 2080.1210258461@sss.pgh.pa.us
Whole thread Raw
In response to Index to enforce non-overlapping ranges?  (James Robinson <jlrobins@socialserve.com>)
List pgsql-sql
James Robinson <jlrobins@socialserve.com> writes:
>     Given a table with a pair of any sort of line-segment-esqe range  
> delimiter columns, is it possible to build a unique index to enforce  
> non-overlapping ranges?

Nope, sorry.  Unique indexes enforce non-equality, but there's no way
to pretend that "overlaps" is an equality condition (hint: it's not
transitive).

I don't say that it'd be impossible to construct an index type that
could do this, but you won't get there with the pieces we have.
        regards, tom lane


pgsql-sql by date:

Previous
From: James Robinson
Date:
Subject: Index to enforce non-overlapping ranges?
Next
From: Chris Browne
Date:
Subject: Re: Index to enforce non-overlapping ranges?