From: | Ashish Karalkar <ashishka(at)synechron(dot)com> |
---|---|
To: | Jan-Peter Seifert <Jan-Peter(dot)Seifert(at)gmx(dot)de> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: getting 'full' names of functions? |
Date: | 2009-03-02 13:51:41 |
Message-ID: | 49ABE46D.3000501@synechron.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Jan-Peter Seifert wrote:
> Hello,
>
> before I reinvent the wheel I'd like to know whether there's a shortcut for getting the 'full' name (incl. argtypes) of the functions within a database in order to REVOKE priviliges on them given to certain users.
> I don't see anything in the docs: http://www.postgresql.org/docs/8.3/interactive/functions-info.html#FUNCTIONS-INFO-CATALOG-TABLE
>
> Obviously you can't just use the specific_name from information_schema.routine_privileges for this.
>
> Any help is appreciated.
>
> Thank you very much,
>
> Peter
>
May be this will help you:
SELECT
n.nspname||'.'||p.proname||'('||pg_catalog.oidvectortypes(p.proargtypes)
||')'
FROM pg_catalog.pg_proc p
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
WHERE p.prorettype <> 'pg_catalog.cstring'::pg_catalog.regtype
AND p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype
AND NOT p.proisagg
AND pg_catalog.pg_function_is_visible(p.oid)
AND nspname != 'pg_catalog'
--Ashish
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-03-02 15:07:57 | Re: getting 'full' names of functions? |
Previous Message | Jan-Peter Seifert | 2009-03-02 12:20:20 | getting 'full' names of functions? |