Re: WIP: generalized index constraints

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: WIP: generalized index constraints
Дата
Msg-id 37ed240d0907161651s7c70f64fn1f7eedd4f9441dd0@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WIP: generalized index constraints  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: WIP: generalized index constraints  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
2009/7/17 Jeff Davis <pgsql@j-davis.com>:
> Another idea that I thought about is that:
>
>   ALTER TABLE foo ADD UNIQUE (a, b) USING foo_idx;
>
> could be a shorthand for:
>
>   ALTER TABLE foo ADD INDEX CONSTRAINT (a =, b =) USING foo_idx;
>
> The benefit is that it could go over GiST indexes or hash indexes, not
> just btrees. The syntax could also be useful to turn an existing btree
> into a unique btree.

I like that idea ... although how would this interact (if at all) with
the existing pg_index.isunique flag?  Would it become deprecated in
favour of using indconstrats, or would you actually look at switching
isunique to TRUE if somebody applies a constraint which is made up
entirely of equality ops?

Cheers,
BJ


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Docbook toolchain interfering with patch review?
Следующее
От: Brendan Jurd
Дата:
Сообщение: Re: Docbook toolchain interfering with patch review?