Re: Per-Database Roles

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Per-Database Roles
Дата
Msg-id 29203.1337695763@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Per-Database Roles  (Thom Brown <thom@linux.com>)
Ответы Re: Per-Database Roles  (Florian Pflug <fgp@phlo.org>)
Список pgsql-hackers
Thom Brown <thom@linux.com> writes:
> 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.

Yeah.  The same type of issue arises for the roles' OIDs.  You'd really
want local and global roles to have nonconflicting OIDs, else it's
necessary to carry around an indication of which type each role is;
which would be more or less a show-stopper in terms of the number of
catalogs and internal APIs affected.  But I don't currently see any
nice way to guarantee that if each database has a private table of
local roles.

You could possibly make it work if all roles, local and global, are
stored in a single shared catalog.  But that seems pretty ugly.

BTW, I wonder whether this type of problem isn't also pretty fatal for
the sorts of hierarchical catalog structures we were speculating about
at PGCon.  When we were talking about that I was sort of assuming that
the more-closely-nested levels could just hide conflicting objects at
outer levels, but on reflection that seems a bit scary.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Readme of Buffer Management seems to have wrong sentence
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Per-Database Roles