Re: Fix disabled triggers with deferred constraints
От | Neil Conway |
---|---|
Тема | Re: Fix disabled triggers with deferred constraints |
Дата | |
Msg-id | 874re6fsm3.fsf@klamath.dyndns.org обсуждение исходный текст |
Ответ на | Re: Fix disabled triggers with deferred constraints (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Fix disabled triggers with deferred constraints
Re: Fix disabled triggers with deferred constraints |
Список | pgsql-patches |
Tom Lane <tgl@sss.pgh.pa.us> writes: > Neil Conway <nconway@klamath.dyndns.org> writes: > > Elliot Lee <sopwith@redhat.com> writes: > > I remember looking at this issue and not doing anything because I > > couldn't decide whether the test for enabled status should occur when > > the trigger is queued or when it is executed --- or, perhaps, both? > > Is there anything in the standard about it? [...] > I think we're still waiting for someone to figure out what the behavior > should be per spec. I took a brief look at SQL99, but I couldn't find anything regarding this issue (AFAICS it doesn't mention "disabled triggers" at all). But given my prior track record for divining information from the standards, perhaps someone should double-check :-) I did notice some behavior which we don't implement AFAIK: If the constraint mode is /deferred/, then the constraint is effectively checked when the constraint mode is changed to /immediate/ either explicitely by execution of a <set constraints mode statement>, or implicitely at the end of the current SQL-transaction. (SQL99, Section 4.17.1, paragraph 3) We don't recheck any outstanding deferred constraints when the constraint mode is explicitly switched back to IMMEDIATE, as the standard says we should. Cheers, Neil -- Neil Conway <neilconway@rogers.com> PGP Key ID: DB3C29FC
В списке pgsql-patches по дате отправления: