public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Nicolas Mitchell <[email protected]>
Cc: hubert depesz lubaczewski <[email protected]>
Cc: pgsql-novice <[email protected]>
Subject: Re: Trigger function
Date: Tue, 27 Jul 2021 16:19:57 -0700
Message-ID: <CAKFQuwY-1SH+2aGbceazDw+MvrBLC1raD951vBA7LivE2QmNzQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<CAKFQuwazmQBDYdt+zcw2WV+3bONRjbe7qoHiMnREYj+VRXEXjA@mail.gmail.com>
	<[email protected]>

On Tue, Jul 27, 2021 at 4:04 PM Nicolas Mitchell <[email protected]>
wrote:

>
> > When you write a trigger for a table you should be executing commands
> > against the same table.
>
> I believe this implies that the code creating a new object (INSERT INTO
> public.object…) row should reside elsewhere.
>
>
Since the trigger is on host but the insert is going to object my
observation does not apply.

Personally, I'm generally against placing this kind of data construction
logic inside triggers.

David J.


view thread (11+ messages)  latest in thread

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]
  Subject: Re: Trigger function
  In-Reply-To: <CAKFQuwY-1SH+2aGbceazDw+MvrBLC1raD951vBA7LivE2QmNzQ@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