You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not quite sure it this is a bug but at least, I guess another better message should be flagged
a) I created a trigger ANYNAME for a table
create or alter trigger ANYNAME for TABLE1 before insert as
begin
-- code that uses columns from TABLE1
end;
b) I realized that the trigger was not for TABLE1 but for ANOTHERTABLE, so I issued:
create or alter trigger ANYNAME for ANOTHERTABLE before insert as
begin
-- code that uses columns from ANOTHERTABLE
end;
The code refused to compile, claiming new.columnfromANOTHERTABLE was unknown. Realizing what happened I just dropped the trigger ANYNAME and everything ran fine, but I guess "Trigger table can not be modified"
c) Even if you don´t refer to columns in ANOTHERTABLE the trigger is still attached to TABLE1 (In my opinion this is indeed a bug)
create or alter trigger ANYNAME for ANOTHERTABLE before insert as
begin
-- code that does not use any column from ANOTHERTABLE
-- ¡the trigger will still refer to TABLE1 events!
end;
Submitted by: Alvaro Castiello (acastiello)
Votes: 1
Not quite sure it this is a bug but at least, I guess another better message should be flagged
a) I created a trigger ANYNAME for a table
create or alter trigger ANYNAME for TABLE1 before insert as
begin
-- code that uses columns from TABLE1
end;
b) I realized that the trigger was not for TABLE1 but for ANOTHERTABLE, so I issued:
create or alter trigger ANYNAME for ANOTHERTABLE before insert as
begin
-- code that uses columns from ANOTHERTABLE
end;
The code refused to compile, claiming new.columnfromANOTHERTABLE was unknown. Realizing what happened I just dropped the trigger ANYNAME and everything ran fine, but I guess "Trigger table can not be modified"
c) Even if you don´t refer to columns in ANOTHERTABLE the trigger is still attached to TABLE1 (In my opinion this is indeed a bug)
create or alter trigger ANYNAME for ANOTHERTABLE before insert as
begin
-- code that does not use any column from ANOTHERTABLE
-- ¡the trigger will still refer to TABLE1 events!
end;
Commits: 04b3f23 FirebirdSQL/fbt-repository@ca4811f
The text was updated successfully, but these errors were encountered: