Re: Grant permission to all objects of user A to user B

From: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
To: sgnerd(at)yahoo(dot)com(dot)sg (kumar)
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Grant permission to all objects of user A to user B
Date: 2004-04-15 17:07:49
Message-ID: 200404151507.RAA03297@rodos
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dimitar Georgievski 2004-04-15 21:07:07 Update is very slow on a bigger table
Previous Message Christoph Haller 2004-04-15 16:58:48 Re: Row count after SELECT INTO?