Re: Per-Database Roles

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: Per-Database Roles
Дата
Msg-id CAA-aLv4Dv8q_syFDa+EBRJGaAS87H6kk_dJWqZ_hyOj8nTnotQ@mail.gmail.com
обсуждение исходный текст
Ответ на Per-Database Roles  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: Per-Database Roles  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Per-Database Roles  (Robert Haas <robertmhaas@gmail.com>)
Re: Per-Database Roles  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
On 22 May 2012 14:04, Stephen Frost <sfrost@snowman.net> wrote:

> What would the semantics of that look like though?  Which is "preferred"
> when you do a 'grant select' or 'grant role'?  Or do we just disallow
> overlaps between per-DB roles and global roles?  If we don't allow
> duplicates, I suspect a lot of the other questions suddenly become a lot
> easier to deal with, but would that be too much of a restriction?  How
> would you handle migrating an existing global role to a per-database
> role?

Perhaps:

CREATE [ GLOBAL | LOCAL ] ROLE name [ LIKE role_name ] [ [ WITH ]
option [ ... ] ]

Then:

CREATE LOCAL ROLE localrolename LIKE globalrolename;

REASSIGN OWNED BY globalrolename TO localrolename;

Conflicts would occur where localrolename matches an existing local
role name within the same database, or a global role name, but not a
local role name within another database.  The problem with this,
however, is that creating global roles would need conflict checks
against local roles in every database, unless a manifest of all local
roles were registered globally.

--
Thom


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Albe Laurenz"
Дата:
Сообщение: Re: Changing the concept of a DATABASE
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Readme of Buffer Management seems to have wrong sentence