Re: Trigger function

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Nicolas Mitchell <mitchelln(at)posteo(dot)net>
Cc: hubert depesz lubaczewski <depesz(at)depesz(dot)com>, pgsql-novice <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: Re: Trigger function
Date: 2021-07-27 23:19:57
Message-ID: CAKFQuwY-1SH+2aGbceazDw+MvrBLC1raD951vBA7LivE2QmNzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, Jul 27, 2021 at 4:04 PM Nicolas Mitchell <mitchelln(at)posteo(dot)net>
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.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Nicolas Mitchell 2021-07-28 00:41:55 Re: Trigger function
Previous Message Nicolas Mitchell 2021-07-27 23:06:29 Re: Trigger function