Re: Unique constraints for non-btree indexes

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Unique constraints for non-btree indexes
Дата
Msg-id 87hd80wwbd.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Unique constraints for non-btree indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Martijn van Oosterhout <kleptog@svana.org> writes:
> > I guess what you're talking about is a constrained index, of which a
> > unique index is just a particular type. I suppose the actual constraint
> > would be one of the operators defined for the operator class (since
> > whatever the test is, it needs to be indexable). Although some would
> > obviously be more useful than others...
> 
> I think the generalization that would be appropriate for GIST is that
> a "unique" index guarantees there are no two entries x, y such that
> x ~ y, where ~ is some boolean operator nominated by the opclass.  We'd
> probably have to insist that ~ is commutative (x ~ y iff y ~ x).

I have no big contribution here. I just want to say this is a cool idea.
These Generalized uniqueish constraints could make a lot of neat things
possible.

-- 
greg



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: 8.0.5 Bug in unique indexes?
Следующее
От: Tom Lane
Дата:
Сообщение: Indexes vs. cache flushes