From: | Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | improve SET CONSTRAINTS |
Date: | 2002-08-07 23:54:22 |
Message-ID: | 87r8hagr81.fsf@klamath.dyndns.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)rogers(dot)com>
PGP Key ID: DB3C29FC
Attachment | Content-Type | Size |
---|---|---|
set_constraints.patch | text/x-patch | 19.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-08-08 02:04:17 | Re: CLUSTER patch and regression test |
Previous Message | Greg Copeland | 2002-08-07 23:27:46 | SQL Comments |