From: Joe Conway <mail@joeconway.com>
To: Jean-Denis Giguere <jdenisgiguere@fastmail.fm>
Cc: pgsql-admin@postgresql.org
Subject: Re: grant execute on many functions
Date: Tue, 29 Jun 2004 15:27:59 -0700
Message-ID: <40E1ECEF.5090007@joeconway.com> (raw)
In-Reply-To: <40E1E1A9.8080207@fastmail.fm>
References: <40E1E1A9.8080207@fastmail.fm>
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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: mail@joeconway.com, jdenisgiguere@fastmail.fm
Subject: Re: grant execute on many functions
In-Reply-To: <40E1ECEF.5090007@joeconway.com>
References: <40E1E1A9.8080207@fastmail.fm> <40E1ECEF.5090007@joeconway.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