Re: Allow database owners to CREATE EVENT TRIGGER - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Allow database owners to CREATE EVENT TRIGGER
Date
Msg-id CAKFQuwaw-gavW63pAXa_YiSK131OYf_tVfn1_kkQ7zTrXDUYhA@mail.gmail.com
Whole thread Raw
In response to Re: Allow database owners to CREATE EVENT TRIGGER  (Steve Chavez <steve@supabase.io>)
List pgsql-hackers
On Sunday, April 20, 2025, Steve Chavez <steve@supabase.io> wrote:
> Also, this looks unconventional…
> EventTriggerCacheItem *item = (EventTriggerCacheItem*) lfirst_oid(lc);

Just noticed the mistake there, I would have expected a compilation error. New patch attached with the following change:

  EventTriggerCacheItem *item = lfirst(lc);

On Sun, 20 Apr 2025 at 22:55, Steve Chavez <steve@supabase.io> wrote:
Sorry, attached the output file.


You can remove role member_1 and trigger..1 and “create table foo” from the nosuper script without any loss of test coverage.  Or member2 trigger2 table_bar along with the alter event trigger command which doesn’t need to be exercised here.  Ownership is all that matters.  Whether come to directly or via alter.

Actually, leave the other member around, but not granted ownership, and both create tables, to demonstrate that a non-superuser and non-owner is unaffected by the trigger.

David J.

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: [PATCH] Documentation: Fix minor grammatical and formatting issues
Next
From: Frédéric Yhuel
Date:
Subject: Re: [BUG] temporary file usage report with extended protocol and unnamed portals