Subject | Re: [firebird-support] Disable trigger? |
---|---|
Author | Ann Harrison |
Post date | 2011-03-15T16:15:16Z |
On Tue, Mar 15, 2011 at 3:54 AM, Paul Vinkenoog <paul@...> wrote:
a trigger to be inactive is a system-wide event and will stop other transactions
on other connections from logging their changes.
Good luck,
Ann
> "homerjones1941" wrote:Paul's answer is technically correct, but practically disastrous. Setting
>
>> ... However, I don't need to log certain program-created updates. For example
>> certain fields are automatically updated each day for hundreds or even thousands
>> of records. ... Is there a way my stored procedure can disable a trigger, do its job,
>> and then re-enable?
>
> execute statement 'alter trigger MyTrigger inactive';
> ...
> execute statement 'alter trigger MyTrigger active';
>
> You need EXECUTE STATEMENT to circumvent the no-DDL rule in PSQL.
>
a trigger to be inactive is a system-wide event and will stop other transactions
on other connections from logging their changes.
Good luck,
Ann