Re: granting privileges - Mailing list pgsql-general

From Najib Abi Fadel
Subject Re: granting privileges
Date
Msg-id 004a01c4d782$4e35de50$f664a8c0@najib
Whole thread Raw
In response to granting privileges  (Nageshwar Rao <NageshwarR@PLANETASIA.COM>)
List pgsql-general
Hi Nageshwar try this command i think it's what you need.
 
psql -t -d DataBaseName -c "select tablename from pg_tables where schemaname='theSchemaName' " | xargs -i  psql -t -d DataBaseName -c "grant select on {} to nabifadel"
 
 
Najib.
Programmer at Saint-Joseph University
Lebanon
 
 
----- Original Message -----
Sent: Wednesday, December 01, 2004 7:36 AM
Subject: [GENERAL] granting privileges

How to grant privileges to all objects( tables,sequences etc) in specific schema, I mean I want to give users select,insert,delete and update to all objects in the schema in one sql statement.I know

 

Grant select,insert,update,delete on table_name to user_name.  But this is for individual table .

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: [HACKERS] Adding Reply-To: to Lists configuration ...
Next
From: Richard Huxton
Date:
Subject: Re: Trigger problem 2