Re: Index to enforce non-overlapping ranges?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Index to enforce non-overlapping ranges?
Дата
Msg-id 2080.1210258461@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Index to enforce non-overlapping ranges?  (James Robinson <jlrobins@socialserve.com>)
Список 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 по дате отправления:

Предыдущее
От: James Robinson
Дата:
Сообщение: Index to enforce non-overlapping ranges?
Следующее
От: Chris Browne
Дата:
Сообщение: Re: Index to enforce non-overlapping ranges?