My question is similar to the headline of the question posted here However the answer there are different and much more complex than what I need.
My problem is simple... I have a function name say func1
and I would like to know if and where this function was implemented. Get it's location, it's arguments and it's code. I've tried to build one using pg_proc
:
select proname,prosrc from pg_proc where proname like 'func1';
How do I add schema name, function code (text) , and function argument list?
Another issue which is curious to me... Can I make it work if instead of func1
I'll search lower
? lower is a build in function which is not implemented by the user.
The question do not address my whole problem. as it doesn't explain how do get in what schema the function is defined nor if it will work on functions which are build in SQL standard like lower(string).