pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ashish Karalkar <ashishka@synechron.com>
To: Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>
Cc: pgsql-admin@postgresql.org
Subject: Re: getting 'full' names of functions?
Date: Mon, 02 Mar 2009 19:21:41 +0530
Message-ID: <49ABE46D.3000501@synechron.com> (raw)
In-Reply-To: <20090302122020.137490@gmx.net>
References: <20090302122020.137490@gmx.net>

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



view thread (10+ messages)  latest in thread

Message-ID: <49ABE46D.3000501@synechron.com>
Permalink:  ../49ABE46D.3000501@synechron.com/
Also on:    postgresql.org/message-id/49ABE46D.3000501@synechron.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ashishka@synechron.com, Jan-Peter.Seifert@gmx.de
  Subject: Re: getting 'full' names of functions?
  In-Reply-To: <49ABE46D.3000501@synechron.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox