Subject | RE: [firebird-support] Updating table without triggering trigger |
---|---|
Author | Alan McDonald |
Post date | 2010-04-14T15:18:54Z |
> Hello,correct
>
> I have a table with a "before update" trigger. In some special cases,
> I want to update this table without triggering that trigger.
> My guess is that "alter trigger <trigger> inactive" will make it
> inactive to all other transactions, too, right?
> Or is it possible to make it inactive, update the table and make itsimply test for a condition in the trigger and surround the trigger code in this condition. if the condition exists, the trigger fires. There are myriad ways to set a condition.
> active again, without interfering with other transactions?
>
> Regards,
>
> Daniel Albuschat
e.g. create a special user to do only these types of actions. Then connect to the DB with this user, and have the trigger test for IF (USER<>YOURUSER) THEN
...
END
Alan