Re: viewing user defined functions - Mailing list pgsql-novice

From Andreas Kretschmer
Subject Re: viewing user defined functions
Date
Msg-id 20090809082356.GA5074@tux
Whole thread Raw
In response to viewing user defined functions  (dearsoandso@gmail.com)
List pgsql-novice
dearsoandso@gmail.com <dearsoandso@gmail.com> wrote:

> Hi,
>
> I'm trying to get a look at a user defined function that's being run on a
> server.  pg_top -E tells me it's encountering a syntax error and I'd like to
> get a look at the function as it is running on the server.  I have access to
> the SQL source but there are several version and I don't know which one is
> running now.
>
> How do I go about viewing a user defined function on postgres 8.3?

All informations about such functions are stored in the system-table
pg_proc. To view the source, for instance, do a

select prosrc from pg_proc where proname='insert the function-name';

There are more columns contains information, for instance the arguments,
return-type an so on, read more:

http://www.postgresql.org/docs/8.3/interactive/catalog-pg-proc.html


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

pgsql-novice by date:

Previous
From: Joshua Tolley
Date:
Subject: Re: viewing user defined functions
Next
From: Intengu Technologies
Date:
Subject: Howto define a constraint in a existing column