Re: operator exclusion constraints [was: generalized index constraints]

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: operator exclusion constraints [was: generalized index constraints]
Дата
Msg-id 23369.1253466790@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: operator exclusion constraints [was: generalized index constraints]  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: operator exclusion constraints [was: generalized index constraints]  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> My use case was something else:

> An index on (a, b, c) enforcing the constraints UNIQUE(a, b) and
> UNIQUE(a, c).

> UNIQUE(a, b) can be enforced efficiently. UNIQUE(a, c) might be less
> efficient depending on the selectivity of "a", but as long as "a" is
> selective I think it's useful. The alternative is updating two indices
> on every insert.

> You may still think this use case is too marginal to bother supporting,
> but I never made an argument for the use case you described above.

You're right, it still seems remarkably marginal.  I'm rethinking
my position on use of CONSTRAINT syntax because of the deferrability
issue, but I'm still unconvinced that we need to allow the constraints
to be decoupled from the indexes.
        regards, tom lane


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: WIP: generalized index constraints
Следующее
От: Tom Lane
Дата:
Сообщение: Re: WIP: generalized index constraints