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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: operator exclusion constraints [was: generalized index constraints]
Дата
Msg-id 27088.1253483698@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 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>)
Re: operator exclusion constraints [was: generalized index constraints]  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> 1. Constraint syntax, part of CREATE/ALTER TABLE:

>   [CONSTRAINT <name>] EXCLUSION (<expr> OPERATOR <op>, ...)

Have you actually built this grammar?  I don't think it avoids the
problem, because OPERATOR is possible within a_expr.

Also, don't forget the possibility of wanting a nondefault opclass.
(I'm wondering a bit if anyone will want a WHERE clause, too, though
adding that later shouldn't pose any big syntactic obstacles.)

> Brendan made a strong argument[15] that the behavior of LIKE
> with UNIQUE is wrong, but I don't know if we want to try to fix that
> now. I'd like some more input before I actually take care of this item.

That's really a separate issue, but I think we need to do something to
make it more consistent.  My first thought is that anything made
via CONSTRAINT syntax ought to be copied by LIKE INCLUDING CONSTRAINTS,
while LIKE INCLUDING INDEXES should copy anything you made via CREATE
INDEX.  But note this assumes that there is a clear distinction between
the two.  The constraint-depending-on-index design that you started
with would not permit such a rule, or at least it would mean that
INCLUDING CONSTRAINTS EXCLUDING INDEXES would have failure cases.
        regards, tom lane


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: operator exclusion constraints [was: generalized index constraints]
Следующее
От: Robert Haas
Дата:
Сообщение: Re: generic copy options