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

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: operator exclusion constraints [was: generalized index constraints]
Дата
Msg-id 1253719318.5640.17.camel@jdavis
обсуждение исходный текст
Ответ на Re: operator exclusion constraints [was: generalized index constraints]  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: operator exclusion constraints [was: generalized index constraints]  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, 2009-09-23 at 15:10 +0300, Peter Eisentraut wrote:
> Using CHECK as part of the syntax of an EXCLUSION constraint will surely
> confuse the whole thing with CHECK constraints.
> 
> USING OPERATOR is available, I think.

USING won't work because one of the ways to specify the opclass in an
index_elem is something like:
 CREATE INDEX foo_idx on foo (i USING int4_ops);

which appears to be undocumented, and it's not obvious to me why that is
useful. The normal way is just:
 CREATE INDEX foo_idx on foo (i int4_ops);

Because I am allowing any index_elem for exclusion constraints, that
conflicts with the word USING.

We can either eliminate the USING variant from opt_class (unless it's
necessary for some reason or I missed it in the documentation), or we
can use another word (e.g. WITH or WITH OPERATOR) if you don't like
CHECK.

Regards,Jeff Davis



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

Предыдущее
От: Christian Ullrich
Дата:
Сообщение: Re: Getting the red out (of the buildfarm)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Anonymous code blocks