Subject | RE: [firebird-support] multiple inserts in trigger |
---|---|
Author | Ross Ryding |
Post date | 2007-07-11T12:41:57Z |
Thanks for the ideas, I am not trying to insert into table I am testing.
Basically this is an audit of the JOB Header table. I am using a table
called DO_AUDITDTL to post each insert and as such I would not expect any
concurrence errors from the insert. I will test for null, had not thought
that would be an issue but understand safe better than sorry.
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Helen Borrie
Sent: Wednesday, July 11, 2007 7:31 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] multiple inserts in trigger
At 09:52 PM 11/07/2007, you wrote:
Nope.
if (old.something <> new.something) returns false if one of them is
null. Null isn't a value, it is a state.
connected to what your user interface is doing at all. If there is no
update, the trigger will never fire. If there is an update, the
trigger will always fire.
trigger (bad, bad idea!) you will get infinite recursion. You will
also get a knotty situation if the tables the trigger is updating
have triggers of their own that fire stuff back at table XXXX.
./heLen
[Non-text portions of this message have been removed]
Basically this is an audit of the JOB Header table. I am using a table
called DO_AUDITDTL to post each insert and as such I would not expect any
concurrence errors from the insert. I will test for null, had not thought
that would be an issue but understand safe better than sorry.
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Helen Borrie
Sent: Wednesday, July 11, 2007 7:31 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] multiple inserts in trigger
At 09:52 PM 11/07/2007, you wrote:
>Hello,table)?
>
> Guess I am being slow this morning, why handle NULLS, should they not be
>a miss-compare and thus write a record to the secondary table (audit
Nope.
if (old.something <> new.something) returns false if one of them is
null. Null isn't a value, it is a state.
>Do not understand infinite recursion to check for. Basically the trigger isThe trigger is fired once after every update of table XXXX. It isn't
>fired once when the mrp screen moves to another screen.
connected to what your user interface is doing at all. If there is no
update, the trigger will never fire. If there is an update, the
trigger will always fire.
>During that time 1...you get all update triggers firing for *each* update...
>or more fields could have been changed (I get one trigger for many updates)
>at that point I test the fields and update ones that are appropriate. CouldIf your trigger performs an update on the same table that owns the
>you please explain in a little more detail.
trigger (bad, bad idea!) you will get infinite recursion. You will
also get a knotty situation if the tables the trigger is updating
have triggers of their own that fire stuff back at table XXXX.
./heLen
[Non-text portions of this message have been removed]