From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Hilary Forbes <hforbes(at)dmr(dot)co(dot)uk> |
Cc: | Pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Where are user defined functions stored? |
Date: | 2005-09-23 16:22:33 |
Message-ID: | 4679.1127492553@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hilary Forbes <hforbes(at)dmr(dot)co(dot)uk> writes:
> Many thanks. Suppose I now want to know if there are any user defined functions set up in my database? I was rather hoping I could do something simple like
> \df
> to get a list of **user** defined functions rather as \dt gives me a list of my tables and not the complete list of all the system tables as well. Is there a way of achieving this?
You could do something like
\df public.*
although if your functions are scattered through a bunch of different
schemas it'd get a bit tedious. Or try looking at the catalog for
yourself, eg
select oid::regprocedure, prosrc from pg_proc
where pronamespace != (select oid from pg_namespace
where nspname = 'pg_catalog');
This essentially implements the rule "system functions are those in
pg_catalog". You might want to exclude stuff in information_schema
as well.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Axel Rau | 2005-09-23 16:31:17 | Re: Updating cidr column with network operator |
Previous Message | Hilary Forbes | 2005-09-23 16:18:22 | Re: Where are user defined functions stored? |