| От | Stephen Frost |
|---|---|
| Тема | Re: ROLE based DEFAULT PRIVILEGES |
| Дата | |
| Msg-id | 20130530024517.GO6434@tamriel.snowman.net обсуждение исходный текст |
| Ответ на | ROLE based DEFAULT PRIVILEGES (James Sewell <james.sewell@lisasoft.com>) |
| Список | pgsql-general |
* James Sewell (james.sewell@lisasoft.com) wrote:
> Is there a way to achieve this? I want role_a to maintain this level of
> access as new tables are created (all creators will be in role_b).
Sadly, no. It's exactly what I was originally hoping for with the
DEFAULT PRIVILEGES capability, but it's a non-trivial problem (what do
you do when there are conflicting sets of default privileges for a given
login role because they belong to multiple other roles...?).
What you'll need to do is grant the defauly privileges explicitly for
the account which is logging in / creating the tables. You can specify
the user using:
ALTER DEFAULT PRIVILEGES FOR myuser IN SCHEMA myschema GRANT SELECT ON
TABLES TO role_a;
Or similar, but you'll need to do that for every role in role_b and
update the default privs as you add/remove users from role_b.
Thanks,
Stephen
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера