X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 951EAD1B188 for ; Tue, 29 Jun 2004 18:40:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 37769-05 for ; Tue, 29 Jun 2004 21:40:00 +0000 (GMT) Received: from gaia.cits.rncan.gc.ca (gaiafast.cits.rncan.gc.ca [132.156.18.23]) by svr1.postgresql.org (Postfix) with ESMTP id 13BF4D1B1E0 for ; Tue, 29 Jun 2004 18:39:56 -0300 (ADT) Received: from fastmail.fm (rerun.cits.rncan.gc.ca [132.156.18.10]) by gaia.cits.rncan.gc.ca (8.11.3/8.11.3) with ESMTP id i5TLdsT17007 for ; Tue, 29 Jun 2004 17:39:55 -0400 (EDT) Message-ID: <40E1E1A9.8080207@fastmail.fm> Date: Tue, 29 Jun 2004 17:39:53 -0400 From: Jean-Denis Giguere User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040301 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: grant execute on many functions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/380 X-Sequence-Number: 14040 Hi, I have about 200 functions in a schema and I have to grant execute privilege on all these functions to a group. I have found on the web an interesting function for grant access on table. http://www.lerctr.org/pgnotes/pgnotes.html (http://www.lerctr.org/pgnotes/grant-all.html) 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...) Is there a more simple approach to resolve this problem ? Also if someone has a link to an advanced pl/pgsql documentation, I would really appreciate it because writing this function bypass my current knowledge of sql and the postgresql documentation on this topic don't give very complex examples. Thank you for your attention, -- Jean-Denis Giguère Étudiant en géomatique appliquée à l'environnement Université de Sherbrooke