Subject | Re: Maintain Summary Table with Database Trigger |
---|---|
Author | JackR |
Post date | 2010-07-23T23:29:09Z |
Philip,
No kidding! That's a great feature. I probably ignore those rdb$...
features mostly figuring that I will never need them. I just tried out
a couple of examples in IBExpert and it works very well. The variable
seems to go away on commit. If there was a longer term one, it might
also eliminate the need for the field in the status table but I will
definitely make use of it as it is.
Thanks for your explanation.
Jack
--- In firebird-support@yahoogroups.com, "unordained"
<unordained_00@...> wrote:
No kidding! That's a great feature. I probably ignore those rdb$...
features mostly figuring that I will never need them. I just tried out
a couple of examples in IBExpert and it works very well. The variable
seems to go away on commit. If there was a longer term one, it might
also eliminate the need for the field in the status table but I will
definitely make use of it as it is.
Thanks for your explanation.
Jack
--- In firebird-support@yahoogroups.com, "unordained"
<unordained_00@...> wrote:
>the
> ---------- Original Message -----------
> From: "JackR" jack@...
> > In my
> > program, before making a mass insert, update or delete, I will set
> > triggers to INACTIVE and then set the field in the status table athappen
> > then end of processing. Rebuilding the summary table will then
> > the next time the data is needed. How can I use a context variableto
> > better accomplish my purpose?this would
> ------- End of Original Message -------
>
> Oh, that. I misunderstood Vlad, then. I now think he was telling you
> be better than activating/deactivating triggers:exit;
>
> create trigger ... as
> begin
> if (rdb$get_context('USER_TRANSACTION', 'notrigger') = '1') then
> ...[Non-text portions of this message have been removed]
> end
>
> Before doing mass updates,
>
> execute block as
> begin
> rdb$set_context('USER_TRANSACTION', 'notrigger', '1');
> end
>
> -Philip
>