Re: 7.1 triggering capability question
Posted in 1995
Topics: Stored Procedures & SPL, Triggers, Constraints & Referential Integrity
bw000001@pixie.co.za (Billy Wheeler) wrote: >>We are trying to evaluate the triggering capability of the Informix 7.1 engine. >>We are specifically interested in finding out if a trigger can invoke >>a stand alone unix process. >Dear Bill, >I haven't actually done this myself, but I understand it is possible. You >need the trigger to call a stored procedure, and within the SP you use the >SYSTEM command to run a UNIX process. >HTH. >-- >Cheers, >Billy >----------------------------------------------------------------------------- >-- New, improved, shorter .sig The 7.1 engine has very strict guidlines one must follow in writting stored procedures and triggers. The actual documentation states that you may not do this. I will explain. A trigger is generally fired upon some data modification event occurring. The stored procedures and trigger development manuals state that a procedure that was invoked from a trigger may not execute specific statements (i.e. any command that which could potentially modify the reason the original trigger fired) within the body of the procedure. I have tried several methods to accomplish this and haven't found an attractive way to make this work. I found that when I tried to do this, I was continuously receiving "Syntax Error" during creation of the procedure. If you intend on getting exotic with procedures and triggers I strongly reccomend you get the 7.11 update. I had opened almost 35 bug reports strictly in the SQL trigger and procedures area. Good luck! (entrican@exo.com)