Thread: pg_proc.prosrc -> can I see the function's source?

pg_proc.prosrc -> can I see the function's source?

From
Raphael Bauduin
Date:
Hi all,

When I look at the entry of a pg_prc_row, I get the prosrc column. Does
that represent the id of the source of this function? Can I retrieve it
somewhere and take a look at it without pgdump -s (didn't try it yet,
but read in the archives that this would be a solution)?

Example:

select proname,prosrc  from pg_proc where proname='RI_FKey_noaction_del';
       proname        |        prosrc
----------------------+----------------------
 RI_FKey_noaction_del | RI_FKey_noaction_del
(1 row)


Thanks for your help!

Raph

Re: pg_proc.prosrc -> can I see the function's source?

From
"Victor Yegorov"
Date:
* Raphael Bauduin <raphael@be.easynet.net> [15.05.2003 15:14]:
> Hi all,
>

I'm using:

=> \df+ function_name

--

Victor Yegorov

Re: pg_proc.prosrc -> can I see the function's source?

From
Stephan Szabo
Date:
On Thu, 15 May 2003, Raphael Bauduin wrote:

> When I look at the entry of a pg_prc_row, I get the prosrc column. Does
> that represent the id of the source of this function? Can I retrieve it
> somewhere and take a look at it without pgdump -s (didn't try it yet,
> but read in the archives that this would be a solution)?

The below is a function in C, so you won't get it even with a pgdump -s
(it's one of the foreign key triggers defined in
src/backend/utils/adt/ri_triggers.c if I remember location correctly)

>        proname        |        prosrc
> ----------------------+----------------------
>  RI_FKey_noaction_del | RI_FKey_noaction_del