Re: WIP: generalized index constraints

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: WIP: generalized index constraints
Дата
Msg-id 4A544F61.5020305@googlemail.com
обсуждение исходный текст
Ответ на Re: WIP: generalized index constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> ...  I think it might be interesting to turn
> around Jeff's syntax sketch and provide a way to say that a CONSTRAINT
> declaration should depend on some previously added index, eg
> something like
> 
>     ALTER TABLE tab ADD CONSTRAINT UNIQUE (col1, col2) USING index
> 

Is there any reason to limit UNIQUE constraints to lists of table
columns? If you can build a unique index on an expression, why not a
unique constraint?

A quick test defining an index and manually adding catalog entries for
the constraint and depends showed that it appears to work fine (and it's
compatible with my deferrable unique constraints patch :-) )
- Dean



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

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: WIP: Deferrable unique constraints
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Re: Synch Rep: direct transfer of WAL file from the primary to the standby