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 97BDCD1CA6E for ; Mon, 17 May 2004 14:07:56 -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 74186-10 for ; Mon, 17 May 2004 14:07:32 -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 BAF16D1B273 for ; Mon, 17 May 2004 14:05:44 -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 <0HXV00GGNBG5NJ@ms-dienst.rz.rwth-aachen.de> for pgsql-admin@postgresql.org; Mon, 17 May 2004 19:04:54 +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 19:04:53 +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 i4HH4rKo002997 for ; Mon, 17 May 2004 19:04:53 +0200 (MEST) Received: (qmail 11740 invoked from network); Mon, 17 May 2004 17:04:59 +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 17:04:59 +0000 Date: Mon, 17 May 2004 18:53:58 +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: <40A8EE26.70405@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/160 X-Sequence-Number: 13476 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 be 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