Subject | Re: [firebird-support] Problem with CREATE TRIGGER |
---|---|
Author | Nando Dessena |
Post date | 2004-04-16T09:11:16Z |
Marco,
M> I found this problem with CREATE TRIGGER under FB 1.5 (tried with RC6
M> and the official release).
M> If I issue this statement:
M> CREATE TRIGGER TN021magmese_AUDA FOR TN021 ACTIVE
M> AFTER UPDATE OR INSERT OR DELETE POSITION 0
M> AS
M> DECLARE VARIABLE numrec INTEGER;
M> BEGIN
M> // BLAH BLAH BLAH
M> END^
M> The trigger is compiled as
M> CREATE TRIGGER TN021magmese_AUDA FOR TN021 ACTIVE
M> POSITION 0
M> AS
M> DECLARE VARIABLE numrec INTEGER;
M> BEGIN
M> // BLAH BLAH BLAH
M> END^
How did you reach this conclusion? If you did it by extracting the
metadata, then it's most probably a problem with your metadata
extraction tool.
I issued an equivalent DDL statement with Firebird 1.5 and then extracted the
metadata with isql (show trigger test;). Here is the result:
TEST, Sequence: 0, Type: AFTER UPDATE OR INSERT OR DELETE, Active
as
begin
exit;
end
The metadata extractor built into IB_SQL showed this:
CREATE TRIGGER TEST FOR ARTICLES
/* TriggerType Unknown: 108 */
AS
begin
exit;
end^
I might not have the latest version, though.
M> And nothing works well instead after a post on the table TN021 I receive
M> on the client a strange "stack overflow error for excessive recursions"
M> from the server.
Cannot confirm. My trigger works as expected (ie it does nothing).
Unless you can provide a reproducible test case I guess the problem
must be in recursion triggered (no pun intended!) by the
// BLAH BLAH BLAH
that you didn't show us.
Ciao
--
Nando Dessena
mailto:nandod@...
M> I found this problem with CREATE TRIGGER under FB 1.5 (tried with RC6
M> and the official release).
M> If I issue this statement:
M> CREATE TRIGGER TN021magmese_AUDA FOR TN021 ACTIVE
M> AFTER UPDATE OR INSERT OR DELETE POSITION 0
M> AS
M> DECLARE VARIABLE numrec INTEGER;
M> BEGIN
M> // BLAH BLAH BLAH
M> END^
M> The trigger is compiled as
M> CREATE TRIGGER TN021magmese_AUDA FOR TN021 ACTIVE
M> POSITION 0
M> AS
M> DECLARE VARIABLE numrec INTEGER;
M> BEGIN
M> // BLAH BLAH BLAH
M> END^
How did you reach this conclusion? If you did it by extracting the
metadata, then it's most probably a problem with your metadata
extraction tool.
I issued an equivalent DDL statement with Firebird 1.5 and then extracted the
metadata with isql (show trigger test;). Here is the result:
TEST, Sequence: 0, Type: AFTER UPDATE OR INSERT OR DELETE, Active
as
begin
exit;
end
The metadata extractor built into IB_SQL showed this:
CREATE TRIGGER TEST FOR ARTICLES
/* TriggerType Unknown: 108 */
AS
begin
exit;
end^
I might not have the latest version, though.
M> And nothing works well instead after a post on the table TN021 I receive
M> on the client a strange "stack overflow error for excessive recursions"
M> from the server.
Cannot confirm. My trigger works as expected (ie it does nothing).
Unless you can provide a reproducible test case I guess the problem
must be in recursion triggered (no pun intended!) by the
// BLAH BLAH BLAH
that you didn't show us.
Ciao
--
Nando Dessena
mailto:nandod@...