improve SET CONSTRAINTS

Поиск
Список
Период
Сортировка
От Neil Conway
Тема improve SET CONSTRAINTS
Дата
Msg-id 87r8hagr81.fsf@klamath.dyndns.org
обсуждение исходный текст
Ответы Re: improve SET CONSTRAINTS  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
This patch improves the behavior of SET CONSTRAINTS so that it
complies with the SQL99 standard, as discussed earlier on
-patches. According to SQL99, setting a constraint to IMMEDIATE needs
to take effect retroactively: any outstanding deferred modifications
need to be checked when the constraint mode is changed, not when the
transaction commits.

I also took the opportunity to remove a bunch of code in trigger.c
that wasn't doing anything useful, AFAICS -- according to SQL99, SET
CONSTRAINTS should only apply to the current transaction. So if we're
not inside a transaction block currently, SET CONSTRAINTS can return
immediately. I also wrote some regression tests for deferred
constraints, as well as the new behavior implemented by this patch.

I updated the documentation, and all the regression tests pass.

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: CLUSTER patch and regression test
Следующее
От: Tom Lane
Дата:
Сообщение: Re: CLUSTER patch and regression test