Get program which caused a trigger?
Posted in 1997
Douglas Wilson — — source: Informix-list mailing list archive (1991-1998)
I know I've read before that you can't tell from inside a trigger what program actually caused the trigger. But maybe someone can explain to me (I have not yet written any SPL or triggers) if and why this will or will not work: Say there's a trigger on update of a table. There must be a lock on that row, so we ought to be able to use the table number and rowid to get the owner of the lock, and then get the owner's session id, from which you can get the process id, and then the program name. If this will will work, what's the easiest way to do it, and if it won't work, why not? I'm not worried about the efficiency, since this would be just a temporary trigger to track down a problem. TIA, Douglas Wilson