Re: [GENERAL] How to display user-defined functions?

From: José Soares <jose(at)sferacarta(dot)com>
To: Teodor Cimpoesu <teo(at)digiro(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] How to display user-defined functions?
Date: 1999-09-01 12:42:42
Message-ID: 37CD1F42.A20F0EFE@sferacarta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Your functions are stored in the table pg_proc.
If you want to display the text of a function, try this:

select PROSRC from pg_proc where proname = 'your_function_name';

José

Teodor Cimpoesu ha scritto:

> Mark Dalphin wrote:
> >
> > Hi,
> >
> > Is there a way to display user-defined functions? For example, if I define a
> > function using PL/pgsql, what tables do I query and in what way to learn that
> > the function exisits and further, what its defintion is? I can find functions
> > that return known types, eg getTimeStamp, below, shows up with '\df', however
> > functions defined returning type "opaque" do not show up, eq,
> > "exon_foreign_keys", below.
>
> afaik this *should* work:
> SELECT * FROM pg_proc WHERE procname='your_f_name_here';
> I'm not sure of "procname",though
> also try to display system tables (I think \dS or something)
> and peek into other suspicious pg_* tables :)
> [snip]
> --
> CIMPOESU Teodor, Web Programmer (h)
> @ DIGICOM S.A. Bucharest, Romania
> @ Internet, site development
> @ teo(at)digiro(dot)net, +(401)-330.47.28
>
> official home page ~ http://www.digiro.net/
> Internet web page ~ http://internet.digiro.net/
>
> ************

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Péder 1999-09-01 16:03:42 RE: [GENERAL] Internal limitation of the CREATE VIEW statement
Previous Message amy cheng 1999-09-01 07:07:29 Re: [GENERAL] change null to ""