Re: Clarify how triggers relate to transactions

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: him(at)nathanmlong(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Clarify how triggers relate to transactions
Date: 2021-08-18 11:06:05
Message-ID: 740c8d600cac5b816f8351dbc47b7e457260ed48.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

On Fri, 2021-07-30 at 16:20 -0400, Tom Lane wrote:
> Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> writes:
> > On Wed, 2021-04-28 at 13:24 +0200, Laurenz Albe wrote:
> > > On Tue, 2021-04-27 at 14:26 +0000, PG Doc comments form wrote:
> > > > If I understand correctly, it would be helpful to add this sentence or a
> > > > corrected version of it: "Triggers always execute in the same transaction as
> > > > the triggering event, and if a trigger fails, the transaction is rolled
> > > > back."
> >
> > Here is a proposed patch for this.
>
> I think this is a good idea, but I felt like you'd added the extra
> sentences in not-terribly-well-chosen places. For instance, your
> first addition in trigger.sgml is adding to a para that talks about
> triggers for tables, while the next para talks about triggers for
> views. So it seems unclear whether the statement is meant to apply
> to view triggers too.
>
> I think it'd work out best to make this a separate para after the
> one that defines before/after/instead-of triggers. How do you
> like the attached?

That is better, and I like your patch. Thanks!
Keeping paragraphs short is a good thing.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Laurenz Albe 2021-08-18 12:24:13 Re: Improve documentation for pg_upgrade, standbys and rsync
Previous Message radiodiversion 2021-08-18 06:18:28 Re: Unclear\mistakable description of UPDATE behaviour in "13.2.1. Read Committed Isolation Level"

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2021-08-18 11:06:18 Re: Fix uninitialized variable access (src/backend/utils/mmgr/freepage.c)
Previous Message Dipesh Pandit 2021-08-18 11:05:23 Re: .ready and .done files considered harmful