public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: sud <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Trigger usecase
Date: Tue, 30 Jul 2024 08:41:26 -0700
Message-ID: <CAKFQuwZ1tfj-ycQR1tx=Qp9zO4O7gUj-wrJZKYX3hUtvFrB96g@mail.gmail.com> (raw)
In-Reply-To: <CAD=mzVU0rx4A0onfC4jHxZ7XreZrk9DNa9pFoGDOjPD1ZhfHgw@mail.gmail.com>
References: <CAD=mzVU0rx4A0onfC4jHxZ7XreZrk9DNa9pFoGDOjPD1ZhfHgw@mail.gmail.com>
On Tue, Jul 30, 2024 at 8:16 AM sud <[email protected]> wrote:
>
> I understand, technically its possible bith the way, but want to
> understand experts opinion on this and pros ans cons?
>
>
Have client code call a function that performs the relevant work directly
instead of having a trigger perform similar work.
Probably should just remove insert/update/delete permissions from most
users on that table as well, make the function owned by the table owner and
with security definer so it is allowed to perform the needed work. But the
normal application user is unable to bypass using said function to perform
DML on the table.
David J.
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Trigger usecase
In-Reply-To: <CAKFQuwZ1tfj-ycQR1tx=Qp9zO4O7gUj-wrJZKYX3hUtvFrB96g@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox