On Sat, 12 Jun 2004, Alvaro Herrera wrote: > On Sat, Jun 12, 2004 at 10:27:15AM -0700, Stephan Szabo wrote: > > > As a question, what was the general assumption about what the following > > should do (using a modification of the original test case)? > > [...] > > > Should the statement at (1) fail because the constraint is not immediately > > satisfied, or should it pass because the set constraints all immediate was > > part of a subtransaction that didn't commit? > > I think the correct answer should be that (1) should pass because the > all immediate set would be rolled back. However, GUC vars do not > presently roll back so it doesn't work. In fact, if GUC vars do roll > back, then there is no need to explicitly set all constraints to > deferred, because it would roll back to that value automatically. > > GUC vars are the remaining item for correct nested xacts AFAICS.
AFAIK, SET CONSTRAINTS isn't modifying a GUC variable, it gets turned into a command that goes to DeferredTriggerSetState in trigger.c. ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster