X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9319D5E46C1 for ; Fri, 27 Aug 2004 16:11:55 -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 23001-05 for ; Fri, 27 Aug 2004 19:11:48 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 9866C5E3F15 for ; Fri, 27 Aug 2004 16:11:48 -0300 (ADT) Received: (qmail 556 invoked by uid 500); 27 Aug 2004 19:20:32 -0000 Date: Fri, 27 Aug 2004 14:20:32 -0500 From: Bruno Wolff III To: Nosyman Cc: pgsql-sql@postgresql.org Subject: Re: GRANT ON all tables Message-ID: <20040827192032.GB456@wolff.to> Mail-Followup-To: Nosyman , pgsql-sql@postgresql.org References: <200408271230.i7RCUWCw027233@acten.itcnet.ro> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408271230.i7RCUWCw027233@acten.itcnet.ro> User-Agent: Mutt/1.5.6i 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: 200408/306 X-Sequence-Number: 18803 On Fri, Aug 27, 2004 at 15:30:32 -0000, Nosyman wrote: > Hi there, > > I need to know how can I give privileges to all the tables in a database. > For example, I have one database named "test" .This database contains about > 30 tables. I want to grant SELECT and DELETE privileges to the 'test_user' > by typing GRANT .... just once (something like GRANT SELECT, DELETE ON > all_tables TO test_user). It is possible? I search PostgreSQL docs and I > can't find out... There is no command to do this. You can write a script that queries the information schema and then issues a grant command for each table.