Re: Grant permission to all objects of user A to user B - Mailing list pgsql-sql

From Christoph Haller
Subject Re: Grant permission to all objects of user A to user B
Date
Msg-id 200404151507.RAA03297@rodos
Whole thread Raw
In response to Grant permission to all objects of user A to user B  ("kumar" <sgnerd@yahoo.com.sg>)
Responses Update is very slow on a bigger table
List pgsql-sql
> 
> Dear Friends,
> 
> Postgres 7.3.2.
> 
> I have an database with owner USRA who owns about 300 objects (tables and f=
> unctions). Now I want to give 'ALL' permission to all the objects of USRA t=
> o another database user USRB.
> 
> If I use the grant i need to type all the objects as comma separated, like =
> the following
> booktown=3D# GRANT ALL ON customers, books, editions, publishers
> booktown-#           TO manager;
> CHANGE
> Is there any other way do it.ThanksKumar
> 
> 
If you're using schemas you can grant the whole schema to the new user. 
If not, the only alternative I know about is extract the table/function 
names via \dt / \df commands within psql and use a script to grant the 
privileges. 

Regards, Christoph 



pgsql-sql by date:

Previous
From: Christoph Haller
Date:
Subject: Re: Row count after SELECT INTO?
Next
From: Joe Conway
Date:
Subject: Re: function returning array