Re: GRANT ROLE and triggers

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: GRANT ROLE and triggers
Дата
Msg-id 468CA169.8080304@archonet.com
обсуждение исходный текст
Ответ на GRANT ROLE and triggers  ("Claudio Rossi" <wind.claudio@inwind.it>)
Список pgsql-hackers
Claudio Rossi wrote:
> Hello, I'm trying to write a trigger function which uses GRANT ROLE
> statement. Scenario is: I have a group role (let's call it A) which
> has not superuser privileges and I want to grant A membership to
> current user after an insert on a particular table, then revoke it
> after a delete on it; I write trigger function as superuser then I
> normally login as unprivileged user. 

I think you want to define your function as SECURITY DEFINER, then it'll 
do what you want.

This isn't a hackers question by the way, the hackers list is for 
developing PostgreSQL itself. This question is better suited to the 
general / sql / admin lists perhaps.

--   Richard Huxton  Archonet Ltd


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

Предыдущее
От: Michael Paesold
Дата:
Сообщение: Re: Still recommending daily vacuum...
Следующее
От: "Simon Riggs"
Дата:
Сообщение: Re: SetBufferCommitInfoNeedsSave and race conditions