Functions and procedures code!!!!

Started by Freddy Menjívar M.over 22 years ago2 messagesgeneral
Jump to latest
#1Freddy Menjívar M.
mmfreddy@hotmail.com

is there any way to get user's
functions and procedures
code from postgresql system catalog.

if a create a function something like

----------------------------------------
CREATE OR REPLACE FUNCTION myfunction()
RETURNS INTEGER

AS'
BEGIN
my code ....;
END;
' LANGUAGE 'plpgsql';
----------------------------------------
How can I retrieve "my code"?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Freddy Menjívar M. (#1)
Re: Functions and procedures code!!!!

"=?iso-8859-1?Q?Freddy_Menj=EDvar_M.?=" <mmfreddy@hotmail.com> writes:

is there any way to get user's
functions and procedures
code from postgresql system catalog.

Sure, just look at pg_proc.prosrc for your function.

regards, tom lane