Re: Trigger execution role - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Trigger execution role
Date
Msg-id 1558725.1613152702@sss.pgh.pa.us
Whole thread Raw
In response to Trigger execution role  (Isaac Morland <isaac.morland@gmail.com>)
Responses Re: Trigger execution role
List pgsql-hackers
Isaac Morland <isaac.morland@gmail.com> writes:
> I was trying to use triggers, and ran into something I hadn't realized
> until now: triggers run, not as the owner of the table, but as the user who
> is doing the insert/update/delete.

If you don't want that, you can make the trigger function SECURITY
DEFINER.  If we forced such behavior, there'd be no way to get the
other behavior.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: WIP: WAL prefetch (another approach)
Next
From: Justin Pryzby
Date:
Subject: Re: pg13.2: invalid memory alloc request size NNNN