"Stewart Ben (RBAU/EQS4) *" <[EMAIL PROTECTED]> writes: > Is there any easy way to script granting privileges to a number of > functions? I've got as far as the following code before realising that > I'll need to pass in the arguments, and the arguments are stored as OIDs > in pg_proc.
> Is there any easy way, such as GRANT .... FUNCTION OID 12345? Coerce the OID to regprocedure to generate a usable name for the function. regression=# select oid from pg_proc limit 5; oid ------ 1242 1243 1244 31 1245 (5 rows) regression=# select oid::regprocedure from pg_proc limit 5; oid ------------------ boolin(cstring) boolout(boolean) byteain(cstring) byteaout(bytea) charin(cstring) (5 rows) regression=# regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org