Re: Unique constraints and indexes.

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Unique constraints and indexes.
Дата
Msg-id CAKFQuwa3=5=Wpn65+2rm-QhN-BHQa9WHak2OCW9qSikh33Rgqw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Unique constraints and indexes.  (Steve Rogerson <steve.pg@yewtc.demon.co.uk>)
Список pgsql-general
On Tuesday, January 5, 2016, Steve Rogerson <steve.pg@yewtc.demon.co.uk> wrote:
On 05/01/16 19:47, Tom Lane wrote:
> Steve Rogerson <steve.pg@yewtc.demon.co.uk> writes:
>> Is this a bug? I create a "unique" index, directly but it doesn't add a unique
>> constraint. Add a unique constraint and it adds the index and the constraint.
>
> That's operating as designed.  A unique constraint needs an index,
> but not vice versa.


I can see that might be plausible , hence the question but as a "unique index"
imposes as constraint they seem equivalent. What's the functional difference
between the two situations?


I suspect it has to do with partial unique indexes.

David J. 

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

Предыдущее
От: Steve Rogerson
Дата:
Сообщение: Re: Unique constraints and indexes.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Unique constraints and indexes.