Subject | Re: [firebird-support] Re: Maintain Summary Table with Database Trigger |
---|---|
Author | unordained |
Post date | 2010-07-23T21:45:27Z |
---------- Original Message -----------
From: "JackR" <jack@...>
Oh, that. I misunderstood Vlad, then. I now think he was telling you this would
be better than activating/deactivating triggers:
create trigger ... as
begin
if (rdb$get_context('USER_TRANSACTION', 'notrigger') = '1') then exit;
...
end
Before doing mass updates,
execute block as
begin
rdb$set_context('USER_TRANSACTION', 'notrigger', '1');
end
-Philip
From: "JackR" <jack@...>
> In my------- End of Original Message -------
> program, before making a mass insert, update or delete, I will set the
> triggers to INACTIVE and then set the field in the status table at
> then end of processing. Rebuilding the summary table will then happen
> the next time the data is needed. How can I use a context variable to
> better accomplish my purpose?
Oh, that. I misunderstood Vlad, then. I now think he was telling you this would
be better than activating/deactivating triggers:
create trigger ... as
begin
if (rdb$get_context('USER_TRANSACTION', 'notrigger') = '1') then exit;
...
end
Before doing mass updates,
execute block as
begin
rdb$set_context('USER_TRANSACTION', 'notrigger', '1');
end
-Philip