Re: Allow database owners to CREATE EVENT TRIGGER

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Aleksander Alekseev <aleksander@timescale.com>
Cc: Steve Chavez <steve@supabase.io>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-03-05T13:54:55Z
Lists: pgsql-hackers
On Wednesday, March 5, 2025, Aleksander Alekseev <aleksander@timescale.com>
wrote:
>
> > Unlike superuser event triggers, which execute functions for every role,
> database owner event triggers are only executed for non-superusers.
>

All this doesn't strike me as a great UI.
>

Yeah. Seems better to make “execute_for” an attribute of the trigger and
allow both superusers and non-superusers to create them.  Then enforce that
non-superusers must specify the more limited value.

Though it would seem nice to be able to exclude the pseudo-admin roles
these service providers create as well.

David J.