Function call identification

Поиск
Список
Период
Сортировка
Искать

Function call identification

От:
"Vishal Kashyap @ [SaiHertz]" <vishalonlist@gmail.com>
Дата:
Dear all,

I was wondering if their exist any function in Plpgsql functions that
would allow me to identify which functions has called what function.

To make it simple suppose I have a function 
func_1 ,func_2 and func_3 

Now func_1 calls function func_2 for some reason and it gives the
results as required now the func_3 also nearly requires same kinda
results but with some changes .

So is their any function that can help me determine which function called func_2

Something like

IF func_call = func_2 THEN
do some blah;
ELSIF func_cal = func_3 THEN
do some more blah;
END IF:


any pointers or round approach would be helpfull. 

-- 
With Best Regards,
Vishal Kashyap.
Lead Software Developer,
http://saihertz.com,
http://vishalkashyap.tk

Re: Function call identification

От:
Thomas Hallgren <thhal@mailblocks.com>
Дата:
Vishal Kashyap @ [SaiHertz] wrote:
> Dear all,
> 
> I was wondering if their exist any function in Plpgsql functions that
> would allow me to identify which functions has called what function.
> 
> To make it simple suppose I have a function 
> func_1 ,func_2 and func_3 
> 
> Now func_1 calls function func_2 for some reason and it gives the
> results as required now the func_3 also nearly requires same kinda
> results but with some changes .
> 
> So is their any function that can help me determine which function called func_2
> 
> Something like
> 
> IF func_call = func_2 THEN
> do some blah;
> ELSIF func_cal = func_3 THEN
> do some more blah;
> END IF:
> 
Why not have the callers call the callee with a boolean parameter?

Regards,
Thomas Hallgren
FAQ