X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B1C40D1B257 for ; Mon, 17 May 2004 12:26:06 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 36725-04 for ; Mon, 17 May 2004 12:25:46 -0300 (ADT) Received: from ms-dienst.rz.rwth-aachen.de (ms-2.rz.RWTH-Aachen.DE [134.130.3.131]) by svr1.postgresql.org (Postfix) with ESMTP id 33F31D1B16B for ; Mon, 17 May 2004 12:25:46 -0300 (ADT) Received: from r220-1 (r220-1.rz.RWTH-Aachen.DE [134.130.3.31]) by ms-dienst.rz.rwth-aachen.de (iPlanet Messaging Server 5.2 HotFix 1.12 (built Feb 13 2003)) with ESMTP id <0HXV00B2I6JTFZ@ms-dienst.rz.rwth-aachen.de> for pgsql-admin@postgresql.org; Mon, 17 May 2004 17:19:05 +0200 (MEST) Received: from relay.RWTH-Aachen.DE ([134.130.3.1]) by r220-1 (MailMonitor for SMTP v1.2.2 ) ; Mon, 17 May 2004 17:19:04 +0200 (MEST) Received: from post.halifax.rwth-aachen.de (post.halifax.RWTH-Aachen.DE [134.130.49.251]) by relay.rwth-aachen.de (8.12.10/8.12.7-1) with ESMTP id i4HFJ4Ko017336 for ; Mon, 17 May 2004 17:19:04 +0200 (MEST) Received: (qmail 6735 invoked from network); Mon, 17 May 2004 15:19:08 +0000 Received: from darkenemy.halifax.rwth-aachen.de (HELO halifax.rwth-aachen.de) ([134.130.48.36]) (envelope-sender ) by stargate.halifax.rwth-aachen.de (qmail-ldap-1.03) with SMTP for ; Mon, 17 May 2004 15:19:08 +0000 Date: Mon, 17 May 2004 17:08:10 +0200 From: Ulrich Meis Subject: How do I grant access to entire database at once(schemas,tables,sequences,...)? To: pgsql-admin@postgresql.org Message-id: <40A8D55A.9040600@halifax.rwth-aachen.de> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031013 X-Enigmail-Version: 0.76.4.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/163 X-Sequence-Number: 13479 Hi ! I administrate a development server for a little team, and people want to be able to grant access to an entire database to other developers/freelancers. Up till now, I see two possibilities : 1. Write a script that queries the postgres internal tables for all tables,schemas,sequences,views,functions,... and then executes grant statements for each one of them. This would have to repeated each time a new object is created. 2.(Not sure if this works) Insert a trigger on postgres's internal tables in template1 that grants permission to a group say _group to the created object. Developers that need access to the database can then be added to that group. Both solutions require a serious amount of work compared to the simple task. Is there a simpler or better way to do this? Thanks for any ideas and comments! greetings, Uli