RE: how to tell who the caller of a procedure is
Date: Wed, 30 Jan 2008 13:01:17 -0500
In general I agree that passing an action to take code is a better method for most uses, but where the called module makes a choice about what action to take as part of a security activity then using the call stack trace offers a more secure methodology since the calling module could always 'lie' in the first case. In the case of common error routines it is also probably a better choice.
- Mark D Powell -- Phone (313) 592-5148
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Mark W. Farnham Sent: Wednesday, January 30, 2008 12:34 PM To: oxnard_at_carolina.rr.com; 'Post to FreeList Oracle-L' Subject: *****SPAM***** RE: how to tell who the caller of a procedure is
I suggest "Structured Design (Fundamentals of a Discipline of Computer Program and Systems Design)" by Edward Yourdon and Larry L. Constantine, preferably the second edition, 1978, by Yourdon Press. Page 197 in particular talks about why sequential cohesion is almost always a bad idea.
As a fallback position, I suggest you use a number or a code as an argument, rather than the caller's name, so that next week when the fifth calling function appears, which happens to need to do exactly what the third one does, you can call the procedure with a "3" rather than having to update the procedure to do what "3" does with yet another calling function name.
Unless you're writing a profiler or an error exit traceback report, it is very unlikely you really want to know your caller's name, and even then it seems unlikely you would want to use the name as a process control.
Are you talking about a PL/SQL procedure?
On Behalf Of Oxnard Montalvo
Sent: Wednesday, January 30, 2008 12:02 PM To: Post to FreeList Oracle-L
Subject: how to tell who the caller of a procedure is
Oracle ver 10.2.0.3.0
I have a procedure which is called from one of four functions. Other than simply passing the name in as a varchar is there a way to have the procedure known the name. In my procedure I have one of four things to do based on who the calling function is.
http://www.freelists.org/webpage/oracle-l Received on Wed Jan 30 2008 - 12:01:17 CST