Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 10D41632FD9 for ; Mon, 2 Mar 2009 09:52:04 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 54763-08 for ; Mon, 2 Mar 2009 09:51:52 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail2.Synechron.com (mail2.synechron.com [220.225.40.41]) by mail.postgresql.org (Postfix) with ESMTP id E6870632F3D for ; Mon, 2 Mar 2009 09:51:51 -0400 (AST) Received: from [10.31.15.20] [10.31.15.20] by mail2.Synechron.com with ESMTP (SMTPD-9.10) id A4952593B4; Mon, 02 Mar 2009 19:22:21 +0530 Message-ID: <49ABE46D.3000501@synechron.com> Date: Mon, 02 Mar 2009 19:21:41 +0530 From: Ashish Karalkar User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Jan-Peter Seifert CC: pgsql-admin@postgresql.org Subject: Re: getting 'full' names of functions? References: <20090302122020.137490@gmx.net> In-Reply-To: <20090302122020.137490@gmx.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.431 tagged_above=0 required=5 tests=DNS_FROM_OPENWHOIS=2.431 X-Spam-Level: ** X-Archive-Number: 200903/15 X-Sequence-Number: 31515 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