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 1lbiJQ-0006sM-DH for pgsql-docs@arkaria.postgresql.org; Wed, 28 Apr 2021 11:25:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lbiJP-00069v-5l for pgsql-docs@arkaria.postgresql.org; Wed, 28 Apr 2021 11:24:59 +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 1lbiJO-00069o-SA for pgsql-docs@lists.postgresql.org; Wed, 28 Apr 2021 11:24:59 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lbiJM-0005qD-0P for pgsql-docs@lists.postgresql.org; Wed, 28 Apr 2021 11:24:57 +0000 Received: by mail-ej1-x632.google.com with SMTP id l4so94044529ejc.10 for ; Wed, 28 Apr 2021 04:24:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=UWCZhC++DlXdTiXGxdlPOVo9rYwNtKgyhIgy20w0Afs=; b=vH+l0sgqrxq6zDoZ5cKMZlbkruIUeSu5d/5oYI1tbVgOU9C63lZCRT376V7F/GlT77 5bOEYChpiPmsFFQCyHx2mM9jcFSRGJI1Vbw9t6W5M1q2POoHMZTranwa5L6IgXrYtHLJ N4VTkgjgeIR3SlMyCAPfa6eEGQo2+JNu35pO4yxYAVBuV+0WhbLYuIn78bDLVKDjD4Qt /mnwBf7Sq+D7Z8/jKpNduWLG+TyLGvzBsSXM/IE/UQoDMYskgZh/+kmYcpbpb7b6wahV 86rxnYce6wZjueXI5YHe4w2Uiv9wPtWPMl6XNXldYtU+GYG6Mc1H6JD6hBg9h8VVqSPu 1kyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=UWCZhC++DlXdTiXGxdlPOVo9rYwNtKgyhIgy20w0Afs=; b=ODYq7yXfKGk1Apt2fB5g+vZUmR4PnzChTxacCXw2JvFLm77TfYdikORsI5mNQR3g9M w8iCPU8hLroKyaHEjiy5Fmc2MocJNXAjgSiw4txcLzMnzzwBdD+eyg9fOKEc3IshnU6f REexLFBCUZ0u1EKf3zSIBh5HrrI9z851LY9PRGLORtGZotxhrGVFtwujKSK02JReiQ9z GXsy6XpckT8nOxMmPy8/0ksyAJQBFVrheKkPmiwEJO9IJh0hzgKHGKjvuTfwXwuN3ZRJ rlbxofWOL+bYs7EJCmlVEpZik7hZJsLWvAf7lvW2HRK6I1amhFmI4oqQB3lmBx4o+Qsa x8Ug== X-Gm-Message-State: AOAM532crUfX7PmzgttMjzZW0aoNp2QzUZRLreYG+F9gDFV57HL+kzKL FjgFm9c+ZpI5wV6tBVtgBYSpceSuD4tV6w== X-Google-Smtp-Source: ABdhPJwhX7AMrNc1FIz6sYnmPYouSHkVfACPDGPp8AFpkQ6ny2DmkPST1N4Jk/CNuNSFpqNrcRrmbQ== X-Received: by 2002:a17:906:c827:: with SMTP id dd7mr18132067ejb.225.1619609094344; Wed, 28 Apr 2021 04:24:54 -0700 (PDT) Received: from localhost.localdomain (217-149-168-134.nat.highway.telekom.at. [217.149.168.134]) by smtp.gmail.com with ESMTPSA id z4sm4441881edb.97.2021.04.28.04.24.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 04:24:54 -0700 (PDT) Message-ID: <1a565681fe54535d69e6418ef5ab55405b92beac.camel@cybertec.at> Subject: Re: Clarify how triggers relate to transactions From: Laurenz Albe To: him@nathanmlong.com, pgsql-docs@lists.postgresql.org Date: Wed, 28 Apr 2021 13:24:53 +0200 In-Reply-To: <161953360822.695.15805897835151971142@wrigleys.postgresql.org> References: <161953360822.695.15805897835151971142@wrigleys.postgresql.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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