Allow database owners to CREATE EVENT TRIGGER
От | David G. Johnston |
---|---|
Тема | Allow database owners to CREATE EVENT TRIGGER |
Дата | |
Msg-id | CAKFQuwZvbguMp-=m4fvyD3mA-vB0y=5zOURTBMDHtRkKmob4=g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Allow database owners to CREATE EVENT TRIGGER (Steve Chavez <steve@supabase.io>) |
Список | pgsql-hackers |
On Monday, April 28, 2025, Steve Chavez <steve@supabase.io> wrote:
is (AFAICS) safe to allow to anyone. If that's not good enough
for your notion of what a DB owner should be able to do, the
answer is to grant the DB owner membership in every role that
uses her database. That's effectively what the feature you're
suggesting would do anyway.” - Tom Lane
1. Do `grant evtrig_owner to member with inherit false`, then `member` will not be able to drop the event trigger.
I think they can still use set role…
After getting my head around this, and re-reading what Tom said, I think you have the grant backwards. You’ve made member a member of owner, while the specification would have to be making owner a member of member.
“The notion I proposed earlier that an event trigger only fires
on queries executed by roles the trigger's owner belongs tois (AFAICS) safe to allow to anyone. If that's not good enough
for your notion of what a DB owner should be able to do, the
answer is to grant the DB owner membership in every role that
uses her database. That's effectively what the feature you're
suggesting would do anyway.” - Tom Lane
This might be better to do if you restrict yourself to use a role with the createrole attribute instead of a superuser - since that is effectively what you are trying to model anyway.
David J.
В списке pgsql-hackers по дате отправления: