Re: Replicating privileges from one user to another - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: Replicating privileges from one user to another
Date
Msg-id 4E259032020000250003F4FD@gw.wicourts.gov
Whole thread Raw
In response to Replicating privileges from one user to another  (Mario Splivalo <mario.splivalo@megafon.hr>)
List pgsql-admin
Mario Splivalo <mario.splivalo@megafon.hr> 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

pgsql-admin by date:

Previous
From: Mario Splivalo
Date:
Subject: Replicating privileges from one user to another
Next
From: Ken Caruso
Date:
Subject: Re: 9.0.4 Data corruption issue