public inbox for [email protected]
help / color / mirror / Atom feedFrom: Adrian Klaver <[email protected]>
To: David G. Johnston <[email protected]>
To: sud <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Trigger usecase
Date: Tue, 30 Jul 2024 14:11:28 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwakdL3D-0wkiou11ahxCtyMkCoraVZFu-bkmJ=NH8cJ2w@mail.gmail.com>
References: <CAD=mzVU0rx4A0onfC4jHxZ7XreZrk9DNa9pFoGDOjPD1ZhfHgw@mail.gmail.com>
<[email protected]>
<CAD=mzVVOC=H9zhYn5YF74XMV+7023f5hPvcroSaQu61m7q-yCg@mail.gmail.com>
<CAKFQuwakdL3D-0wkiou11ahxCtyMkCoraVZFu-bkmJ=NH8cJ2w@mail.gmail.com>
On 7/30/24 13:28, David G. Johnston wrote:
> On Tue, Jul 30, 2024 at 11:46 AM sud <[email protected]
> <mailto:[email protected]>> wrote:
>
>
> Not sure of the exact pros and cons, but we were following certain
> rules like , if it's business logic which needs to be implemented in
> Database, then it should not be done using triggers but rather
> should be done through database procedure/functions. Hope this
> understanding correct.
>
>
> That is my personal take. For process-oriented stuff you can follow the
> trail of calls all the way through to the end of the process and its
> final result. With triggers you follow the trail to the
> insert/update/delete then stop thinking that's it, while in reality it
> continues because you have triggers performing yet more work.
>
"On insert/update/delete to this table the following actions are taken
via triggers using the supplied function/procedure:
Insert
Data is sent to audit table using table_audit()
Update
Data is sent to audit table using table_audit()
Delete
Data is sent to audit table using table_audit()
See function specific documentation below
[...]
"
> David J.
>
--
Adrian Klaver
[email protected]
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], [email protected], [email protected]
Subject: Re: Trigger usecase
In-Reply-To: <[email protected]>
* 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