Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lbq3g-0000H2-5b for pgsql-docs@arkaria.postgresql.org; Wed, 28 Apr 2021 19:41:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lbq37-00035O-V3 for pgsql-docs@arkaria.postgresql.org; Wed, 28 Apr 2021 19:40:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lbnpx-0000h4-1X for pgsql-docs@lists.postgresql.org; Wed, 28 Apr 2021 17:18:57 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lbnpu-0000OT-Bh for pgsql-docs@lists.postgresql.org; Wed, 28 Apr 2021 17:18:55 +0000 Received: by mail-ed1-x52a.google.com with SMTP id i3so49504782edt.1 for ; Wed, 28 Apr 2021 10:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nathanmlong-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sKhvSE9jY11FOqqWZ/TBvJ+6Oh6rFKdsuITNQfAaRlE=; b=NsQRC9y5JKL2+3sqZc5l+5of2VIQLxVShfDwOAo2Z/BHQy4pKCtp2WiqdlbhL+04x5 Zl7kUyFlYxIv2GheFN0KevCzH4pTezzsoRH+wNOqjDCdUkgthn1lRxHHi48/iV1QmRqe hyl2+lu3q9TNmjcYf7k8aXdtkhcDjE3LfEz+dkxCTZRmhorrG/zBMEaXD337zGpMrJiZ VLHw82sf3IVB1Hqtjpu/YyNASOFDrbq9Lw3/ghwpTrADWHNjDNjQxXYxrnxmavaT3vDv MXqKqEFMFBXgujbdP4JwfV8aaTZh/ByQI6lyXEcRGY6iZ1XBHxkR4nG6C8XCZ146EPtL hgCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sKhvSE9jY11FOqqWZ/TBvJ+6Oh6rFKdsuITNQfAaRlE=; b=rwL65dHRaNAUvE5M9LNNk/H0Iv32ijm1QF6UN3BWKcUnbsJPZmynUNY8TS5i0OI1RO VTcKwXbljr1BBu60sB+H7d4PyYMGDyxPQfqBqjD40DFmLyszlGbRUbfIAnSipcP8KUGK 3NnJ6dRbFQdRbx+LhRMOM0AGfLz1erpYm/Dsh+KRBZVXh4D4Vi6QGf4w/c3YPUdSN6WZ uhJn/CcejWjMtTqIXBpKLKhJUCicsnK1RReal8E1gZi5bPTnHDQiBaPfD1F+VVjKq7KB foA0A9a2kCb6mBQuog7B290v9mexzye1y7/F4p5Z+UxXhJGnzOxH0DBrG/dM/zjozZXn NFuQ== X-Gm-Message-State: AOAM5325hMK0rN6apbDsQ8QMcDknipMnu5SM/m/4N45rOkBpLBgPIB7T 6827vHFmMHUig71h/ftui6V3InqNQgHxKC90FJ5JoUvq8UM= X-Google-Smtp-Source: ABdhPJwVhTaq/3lpVsBsu8IWAR9TDp3cCcKi9VlyMB1qdNDm8kTtxNJvH2lZm/2AWN+TRnbqwtFWGb2n9D2jMrtyw0c= X-Received: by 2002:a05:6402:cb4:: with SMTP id cn20mr12550459edb.167.1619630331952; Wed, 28 Apr 2021 10:18:51 -0700 (PDT) MIME-Version: 1.0 References: <161953360822.695.15805897835151971142@wrigleys.postgresql.org> <1a565681fe54535d69e6418ef5ab55405b92beac.camel@cybertec.at> In-Reply-To: <1a565681fe54535d69e6418ef5ab55405b92beac.camel@cybertec.at> From: Nathan Long Date: Wed, 28 Apr 2021 13:18:40 -0400 Message-ID: Subject: Re: Clarify how triggers relate to transactions To: Laurenz Albe Cc: pgsql-docs@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000009a8f0805c10b9258" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000009a8f0805c10b9258 Content-Type: text/plain; charset="UTF-8" Gotcha. Where would I go to make the PR? On Wed, Apr 28, 2021, 7:24 AM Laurenz Albe wrote: > On Tue, 2021-04-27 at 14:26 +0000, PG Doc comments form wrote: > > The following documentation comment has been logged on the website: > > > > Page: https://www.postgresql.org/docs/13/sql-createtrigger.html > > Description: > > > > https://www.postgresql.org/docs/current/sql-createtrigger.html mentions > the > > word "transaction" only once, in reference specifically to constraint > > triggers: "They can be fired either at the end of the statement causing > the > > triggering event, or at the end of the containing transaction; in the > latter > > case they are said to be deferred." > > > > 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." > > Good idea in principle, but I'd put that information on > https://www.postgresql.org/docs/current/trigger-definition.html > > Yours, > Laurenz Albe > > --0000000000009a8f0805c10b9258 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Gotcha. Where would I go to make the PR?

On Wed, Apr 28, 2= 021, 7:24 AM Laurenz Albe <l= aurenz.albe@cybertec.at> wrote:
On Tue, 2021-04-27 at 14:26 +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website: >
> Page: https://www.postgresq= l.org/docs/13/sql-createtrigger.html
> Description:
>
> https://www.postgresql= .org/docs/current/sql-createtrigger.html mentions the
> word "transaction" only once, in reference specifically to c= onstraint
> triggers: "They can be fired either at the end of the statement c= ausing the
> triggering event, or at the end of the containing transaction; in the = latter
> case they are said to be deferred."
>
> If I understand correctly, it would be helpful to add this sentence or= a
> corrected version of it: "Triggers always execute in the same tra= nsaction as
> the triggering event, and if a trigger fails, the transaction is rolle= d
> back."

Good idea in principle, but I'd put that information on
https://www.postgresql.org= /docs/current/trigger-definition.html

Yours,
Laurenz Albe

--0000000000009a8f0805c10b9258--