Subject | Re: Triggers |
---|---|
Author | Alexander V.Nevsky |
Post date | 2003-07-12T10:37:30Z |
--- In firebird-support@yahoogroups.com, Mahesh Ishwar
<meghanshic@y...> wrote:
under :
Mahesh, Firebird have no such a limitation, you can access for read
and write table on it's row level triggers, even the same row with
the same operation. Struggle against recursion is on your conscience.
Unlimited recursion leads to server crash and can cause database
corruption at this moment.
other tables and then deletes this row itself?
I make this on after update (Update Set Deleted='Y' -> AU trigger
writes record into log and delete it). Did'nt tried with after insert.
Just try it with test table and you will know :) I can't recall
exactly, but there was bug, seems related to attempts to delete record
itself in Before triggers. It was fixed but I can't recall in which
version, if you are interested, check bug tracker at sourceforge.
About statement level triggers - FB don't have them, but it have
Events - notification of interested client application. Events are
raised in row level triggers and sent to client on transaction's
commit. If there were many identical events during transaction's life
(Table A updated for example), client gets one.
Best regards, Alexander.
<meghanshic@y...> wrote:
> Thanx for ur prompt response.trigger becoz of th eproblem of mutating table restriction describe as
> In my existing Oracle database, I've to write a statement level
under :
Mahesh, Firebird have no such a limitation, you can access for read
and write table on it's row level triggers, even the same row with
the same operation. Struggle against recursion is on your conscience.
Unlimited recursion leads to server crash and can cause database
corruption at this moment.
> I just wanted to know is this possible in Firebird that a triggerwhich is evoked after an insert in a row does some calculation on some
other tables and then deletes this row itself?
I make this on after update (Update Set Deleted='Y' -> AU trigger
writes record into log and delete it). Did'nt tried with after insert.
Just try it with test table and you will know :) I can't recall
exactly, but there was bug, seems related to attempts to delete record
itself in Before triggers. It was fixed but I can't recall in which
version, if you are interested, check bug tracker at sourceforge.
About statement level triggers - FB don't have them, but it have
Events - notification of interested client application. Events are
raised in row level triggers and sent to client on transaction's
commit. If there were many identical events during transaction's life
(Table A updated for example), client gets one.
Best regards, Alexander.