Re: Do docs miss information about timing of triggers? - Mailing list pgsql-general

From Tom Lane
Subject Re: Do docs miss information about timing of triggers?
Date
Msg-id 25868.1464270234@sss.pgh.pa.us
Whole thread Raw
In response to Re: Do docs miss information about timing of triggers?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Do docs miss information about timing of triggers?  (Thomas Güttler <guettliml@thomas-guettler.de>)
List pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thu, May 26, 2016 at 8:50 AM, Thomas Güttler <
> guettliml@thomas-guettler.de> wrote:
>> OK, timing of constraint triggers is explained.
>> But I think the docs don't state the timing of normal AFTER triggers.

> ​Through omission.

It's not *that* bad.  See
https://www.postgresql.org/docs/9.5/static/trigger-definition.html

    Triggers are also classified according to whether they fire before,
    after, or instead of the operation. These are referred to as BEFORE
    triggers, AFTER triggers, and INSTEAD OF triggers
    respectively. Statement-level BEFORE triggers naturally fire before
    the statement starts to do anything, while statement-level AFTER
    triggers fire at the very end of the statement. These types of
    triggers may be defined on tables or views. Row-level BEFORE triggers
    fire immediately before a particular row is operated on, while
    row-level AFTER triggers fire at the end of the statement (but before
    any statement-level AFTER triggers). ...

            regards, tom lane


pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Do docs miss information about timing of triggers?
Next
From: Adrian Klaver
Date:
Subject: Re: Do docs miss information about timing of triggers?