Skip site navigation (1) Skip section navigation (2)

Re: grant execute on many functions

From: Joe Conway <mail(at)joeconway(dot)com>
To: Jean-Denis Giguere <jdenisgiguere(at)fastmail(dot)fm>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: grant execute on many functions
Date: 2004-06-29 22:27:59
Message-ID: 40E1ECEF.5090007@joeconway.com (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-hackers
Jean-Denis Giguere wrote:
> But, the problem is more complex for functions because you have to give 
> the arguments. You can find the list in the pg_proc table but they are 
> store in a array by oid. So you can resolve the type with the table 
> pg_type. After, you have to reproduce the correct syntax (with correct 
> number of orgument, on one execute line...)
> 

Does this help?

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 p.proname ~ '^format_type$';
                ?column?
--------------------------------------
  pg_catalog.format_type(oid, integer)
(1 row)

Joe

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2004-06-29 22:59:20
Subject: Re: [PATCHES] nested xacts and phantom Xids
Previous:From: Alvaro HerreraDate: 2004-06-29 21:47:58
Subject: Re: nested xacts and phantom Xids

pgsql-admin by date

Next:From: IainDate: 2004-06-30 01:24:34
Subject: Re: Stopping vacuum
Previous:From: Jean-Denis GiguereDate: 2004-06-29 21:39:53
Subject: grant execute on many functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group