Re: WIP: generalized index constraints

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: WIP: generalized index constraints
Дата
Msg-id 1247002907.26589.282.camel@monkey-cat.sm.truviso.com
обсуждение исходный текст
Ответ на Re: WIP: generalized index constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, 2009-07-07 at 13:22 -0400, Tom Lane wrote:
> Also, if hash indexes were a realistic alternative to btree for this,
> we'd already have come up against the problem that the CONSTRAINT syntax
> doesn't provide any way to specify what kind of index you want to use
> underneath the constraint.  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
> 

How about:
ALTER TABLE tab ADD INDEX CONSTRAINT [name]    (col1 [op], col2 [op]) USING index

And then just validate the constraint at creation time, and store the
information in pg_constraint.

Regards,Jeff Davis




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: *_collapse_limit, geqo_threshold
Следующее
От: Robert Haas
Дата:
Сообщение: Re: *_collapse_limit, geqo_threshold