Re: Unique Constraints using Non-Unique Indexes

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Unique Constraints using Non-Unique Indexes
Дата
Msg-id 20080320173744.GD12266@svana.org
обсуждение исходный текст
Ответ на Unique Constraints using Non-Unique Indexes  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Unique Constraints using Non-Unique Indexes  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
On Thu, Mar 20, 2008 at 02:35:38PM +0000, Simon Riggs wrote:
> This would then allow us to use a Hash Index or other index as the basis
> for a Unique Constraint and/or considerably reduce size of indexes.

I was under the impression that the reason only b-tree supported unique
indexes was because it could lock one page while to checking visibility
to block concurrent inserts. AIUI other index types (notably gist) would
not be able to easily block concurrent inserts because the place a new
item is entered into the index is not unique nor necessarily deterministic.

Whether hash could support this usage I don't know.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

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

Предыдущее
От: Decibel!
Дата:
Сообщение: Re: [Fwd: Re: [PATCHES] 64-bit CommandIds]
Следующее
От: Sam Mason
Дата:
Сообщение: writing a MIN(RECORD) aggregate