EXLCUDE constraints and Hash indexes

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема EXLCUDE constraints and Hash indexes
Дата
Msg-id CAMkU=1z2K1G=MOyKxB8zfn0MHm_Eu-SGBiUmej460VzU=S8EiQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: EXLCUDE constraints and Hash indexes  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список pgsql-hackers
From: https://www.postgresql.org/docs/9.4/static/sql-createtable.html

"The access method must support amgettuple (see Chapter 55); at
present this means GIN cannot be used. Although it's allowed, there is
little point in using B-tree or hash indexes with an exclusion
constraint, because this does nothing that an ordinary unique
constraint doesn't do better. So in practice the access method will
always be GiST or SP-GiST."

This is misleading.  Hash indexes do not support unique constraints
directly, but do support them via the EXCLUDE syntax using "WITH =".
This is nice if you want a unique index on something that might
occasionally exceed 1/3 of 8kB (titin, I'm looking at you)

Trivial doc patch attached.

Cheers,

Jeff

Вложения

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

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: Declarative partitioning - another take
Следующее
От: Andrew Borodin
Дата:
Сообщение: Re: WIP: Covering + unique indexes.