Re: Replicating privileges from one user to another

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Replicating privileges from one user to another
Дата
Msg-id 4E259032020000250003F4FD@gw.wicourts.gov
обсуждение исходный текст
Ответ на Replicating privileges from one user to another  (Mario Splivalo <mario.splivalo@megafon.hr>)
Список 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 по дате отправления:

Предыдущее
От: Mario Splivalo
Дата:
Сообщение: Replicating privileges from one user to another
Следующее
От: Ken Caruso
Дата:
Сообщение: Re: 9.0.4 Data corruption issue