Generating GRANT/REVOKE on functions from catalog

From: Doug Gorley <doug(dot)gorley(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Generating GRANT/REVOKE on functions from catalog
Date: 2009-08-04 21:36:02
Message-ID: 4A78A9C2.90109@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am attempting to script the generation of grant/revoke statements for
a database, and I'm having some trouble when it comes to functions.

consider the following function:

create function add(a integer, b integer)
returns integer
as $$
select $1 + $2;
$$ language SQL;

The statement I need to generate is:

revoke all on function public.add(integer, integer) from someuser;

I'm attempting to use the pg_proc table in the system catalogs, and I'm
good up to the point where I need the parameter types. Can anyone give
me a hand with this?

Thanks,

--
------------------------------------------------------------------------
*Doug Gorley* | doug(dot)gorley(at)gmail(dot)com <mailto:doug(dot)gorley(at)gmail(dot)com>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul Taylor 2009-08-04 22:08:15 Re: Does derby have an embedded Mode like Derby ?
Previous Message Eric Schwarzenbach 2009-08-04 21:09:26 Re: Does derby have an embedded Mode like Derby ?