X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 66A58D1E1F3 for ; Thu, 15 Apr 2004 12:07:53 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 69539-10 for ; Thu, 15 Apr 2004 12:07:55 -0300 (ADT) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by svr1.postgresql.org (Postfix) with SMTP id 377F5D1DF5D for ; Thu, 15 Apr 2004 12:07:50 -0300 (ADT) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Thu Apr 15 17:07:50 2004 +0200 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id RAA20702; Thu, 15 Apr 2004 17:07:49 +0200 (METDST) From: Christoph Haller Message-Id: <200404151507.RAA03297@rodos> Subject: Re: Grant permission to all objects of user A to user B To: sgnerd@yahoo.com.sg (kumar) Date: Thu, 15 Apr 2004 17:07:49 METDST Cc: pgsql-sql@postgresql.org In-Reply-To: <017d01c422b7$0220cc80$7502a8c0@hdsc.com>; from "kumar" at Apr 15, 104 9:34 am X-Mailer: Elm [revision: 212.4] X-Virus-Scanned: by amavisd-new at postgresql.org X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char 9C hex) in message header 'Received' Received: \234by rodos.fzk.de... ^ X-Archive-Number: 200404/141 X-Sequence-Number: 17516 > > 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