Subject | Re: [firebird-support] Updating table without triggering trigger |
---|---|
Author | Daniel Albuschat |
Post date | 2010-04-14T20:49:06Z |
2010/4/14 MagnOz <macnoz@...>:
problem is that the table in question is one of the biggest tables in
the database and I don't want to add unnecessary fields to it. :-(
Another way would be to create a referenced table that includes this
field only for locked entries in the main table. That would actually
be quite viable, since the table will never include more than 1, maybe
2 entries and hence lookups will be very fast.
Thanks for the replies!
Regards,
Daniel Albuschat
--
eat(this); // delicious suicide
> On Wed, Apr 14, 2010 at 16:23, Daniel Albuschat <d.albuschat@...> wrote:[snip]
>> 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?
>
> Correct.
>
>> Or is it possible to make it inactive, update the table and make it
>> active again, without interfering with other transactions?
> What you could do as a workaround is to add a new field to the table, like this:Yeah, that was the only workaround I could come up with, too. The
problem is that the table in question is one of the biggest tables in
the database and I don't want to add unnecessary fields to it. :-(
Another way would be to create a referenced table that includes this
field only for locked entries in the main table. That would actually
be quite viable, since the table will never include more than 1, maybe
2 entries and hence lookups will be very fast.
Thanks for the replies!
Regards,
Daniel Albuschat
--
eat(this); // delicious suicide