Subject | Triggers chain |
---|---|
Author | Tetram Corp |
Post date | 2007-02-26T08:15:23Z |
is there a way to break a trigger chain?
on a table, i've got 3 triggers after update. First is not revelant
second does:
if (new.qty = 0) then
delete from mytable where id = new.id
third does:
if (new.field = 'T') then
execute procedure update_mytable;
else
execute procedure update_othertable;
the problem is that, sometimes, update_mytable assign 0 to the field qty.
so i've got an error saying "too many execution of the same query" (not
sure about the message but sense is there)
the solution i used to solve my problem was to change the third trigger to
if ((new.field = 'T') and (new.qty > 0)) then
etc
except using an exception, is there a way i could use to break the
trigger chain ?
Thierry
on a table, i've got 3 triggers after update. First is not revelant
second does:
if (new.qty = 0) then
delete from mytable where id = new.id
third does:
if (new.field = 'T') then
execute procedure update_mytable;
else
execute procedure update_othertable;
the problem is that, sometimes, update_mytable assign 0 to the field qty.
so i've got an error saying "too many execution of the same query" (not
sure about the message but sense is there)
the solution i used to solve my problem was to change the third trigger to
if ((new.field = 'T') and (new.qty > 0)) then
etc
except using an exception, is there a way i could use to break the
trigger chain ?
Thierry