Allow pass boolean trigger-context variables: INSERTING, UPDATING or DELETING - 
directly as arguments when call SP from trigger
-------------------------------------------------------------------------------------------------------------------------------

                 Key: CORE-4364
                 URL: http://tracker.firebirdsql.org/browse/CORE-4364
             Project: Firebird Core
          Issue Type: Improvement
    Affects Versions: 3.0 Alpha 2
            Reporter: Pavel Zotov


set term ^;
create or alter procedure sp_ttt as begin end^
set term ;^

recreate table ttt(id int, x int);
commit;
set term ^;
create or alter procedure sp_ttt(is_deleting boolean) as
begin
end^
create or alter trigger ttt_biud for ttt
active before insert or update or delete position 0 as
begin
  --execute procedure sp_ttt( deleting ); ------------------ this causes error 
during compilation: 
  --execute procedure sp_ttt( :deleting ); ------------------ this also causes 
error (note on COLON before "deleting" :))
  execute procedure sp_ttt( iif(deleting, true, false) ); ----- this compiled 
OK; but this expression looks cumbersome because 'deleting' is already of 
BOOLEAN type
end^
set term ;^

/*
PS. Error text:
------------------
Column does not belong to referenced table.
unsuccessful metadata update.
unknown ISC error 336397272.
Dynamic SQL Error.
SQL error code = -206.
Column unknown.
DELETING.
*/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to