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°