Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id C7D72B5DBDE for ; Tue, 19 Jul 2011 16:10:07 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 38743-08 for ; Tue, 19 Jul 2011 19:10:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 5EC6BB5DBDA for ; Tue, 19 Jul 2011 16:10:00 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 19 Jul 2011 14:09:59 -0500 Message-Id: <4E259032020000250003F4FD@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 19 Jul 2011 14:09:54 -0500 From: "Kevin Grittner" To: "Mario Splivalo" , Subject: Re: Replicating privileges from one user to another References: <4E25D4CB.209@megafon.hr> In-Reply-To: <4E25D4CB.209@megafon.hr> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.284 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FS_REPLICA=3.599, RP_MATCHES_RCVD=-1.135, SARE_SPEC_REPLICA=0.72 X-Spam-Level: * X-Archive-Number: 201107/134 X-Sequence-Number: 37913 Mario Splivalo wrote: > I have user foo that is owner of database dbfoo. Now I need to > create user baz that will have the exact same privileges as user > foo on database baz. I've tried this: > > GRANT ALL ON DATABASE dbfoo TO baz; > > but I still can't select form tables. Did you mean that you want user baz to have the same privileges on as user foo on database dbfoo? If so, how about: GRANT foo TO baz; A USER is just a ROLE with login privileges -- you can make other roles a member of the role. Be aware that if you do it this way, any privileges later granted to or revoked from foo will also affect baz. (I don't know whether that's what you want.) -Kevin