Re: Trigger function - Mailing list pgsql-novice

From David G. Johnston
Subject Re: Trigger function
Date
Msg-id CAKFQuwY-1SH+2aGbceazDw+MvrBLC1raD951vBA7LivE2QmNzQ@mail.gmail.com
Whole thread Raw
In response to Re: Trigger function  ("Nicolas Mitchell" <mitchelln@posteo.net>)
Responses Re: Trigger function  ("Nicolas Mitchell" <mitchelln@posteo.net>)
List pgsql-novice
On Tue, Jul 27, 2021 at 4:04 PM Nicolas Mitchell <mitchelln@posteo.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.

pgsql-novice by date:

Previous
From: "Nicolas Mitchell"
Date:
Subject: Re: Trigger function
Next
From: "Nicolas Mitchell"
Date:
Subject: Re: Trigger function