On Mon, Aug 09, 2004 at 11:56:17AM +1000, fastpgs wrote:
> On Sun, 8 Aug 2004 08:19, Alvaro Herrera wrote:
>
> > If the change is global, what should happen on other sessions that have
> > a deferred event from that trigger concurrently with the one that
> > modifies it? Should the answer be different depending on the isolation
> > mode of the transaction?
>
> This was my other question.... It depends on how we are going to treat the
> trigger already on the deferred stack... Are we going to execute the trigger
> as if its status wasn't changed or are we going to double check its status
> just before executing the trigger body ??
No, I'm talking about a different issue. Not what happens with a deferred
event in the queue of the backend executing the disabling operation, but
in another backend.
Think about referential integrity triggers. Will you allow one backend,
that needs to do some strange processing bypassing the triggers, make all
other backends corrupt data by running with triggers disabled? It doesn't
apply only to referential integrity triggers, of course. The user would
need to lock the table to make sure no one uses it while she have the
trigger disabled. That's no good. I think permanent or global trigger
changes are recipes for disaster.
--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
La web junta la gente porque no importa que clase de mutante sexual seas,
tienes millones de posibles parejas. Pon "buscar gente que tengan sexo con
ciervos incendiánse", y el computador dirá "especifique el tipo de ciervo"
(Jason Alexander)