From: Christoph Haller <ch@rodos.fzk.de>
To: sgnerd@yahoo.com.sg
Cc: pgsql-sql@postgresql.org
Subject: Re: Grant permission to all objects of user A to user B
Date: Thu, 15 Apr 2004 17:07:49 METDST
Message-ID: <200404151507.RAA03297@rodos> (raw)
In-Reply-To: <017d01c422b7$0220cc80$7502a8c0@hdsc.com>
>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ch@rodos.fzk.de, sgnerd@yahoo.com.sg
Subject: Re: Grant permission to all objects of user A to user B
In-Reply-To: <200404151507.RAA03297@rodos>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox