Automatically assuming a specific role after connecting to pg

Поиск
Список
Период
Сортировка
От Florian G. Pflug
Тема Automatically assuming a specific role after connecting to pg
Дата
Msg-id 444A74EB.1010202@phlo.org
обсуждение исходный текст
Ответы Re: Automatically assuming a specific role after connecting to pg  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Automatically assuming a specific role after connecting to pg  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-general
I'd like to be able to connect to postgres, and automatically assume a specific role.

I imagine something like
create role myuser ;
create role dev noinherit ;
create role admin noinherit superuser ;
grant dev to myuser ;
grant admin to myuser ;

Now, I'd like a connect as "myuser/admin" to be equivalent to a connect as "myuser"
and then issuing "set role admin". The same should be true for "myuser/dev".

Would it be hard to patch postgres to do that? And would such a patch have a chance
of being accepted into 8.2 (or 8.3)

greetings, Florian Pflug

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

Предыдущее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: sudo-like behavior
Следующее
От: Francisco Reyes
Дата:
Сообщение: out of memory for query result