Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1efsTd-0006Wj-2j for pgsql-docs@arkaria.postgresql.org; Sun, 28 Jan 2018 19:18:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efsTb-00068p-Bw for pgsql-docs@arkaria.postgresql.org; Sun, 28 Jan 2018 19:18:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1efsTb-00068f-6K for pgsql-docs@lists.postgresql.org; Sun, 28 Jan 2018 19:18:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1efsTY-0002L4-5J for pgsql-docs@postgresql.org; Sun, 28 Jan 2018 19:18:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w0SJIcJL028239; Sun, 28 Jan 2018 14:18:38 -0500 From: Tom Lane To: Thomas Munro cc: Bruce Momjian , ian@thepathcentral.com, pgsql-docs@postgresql.org, Andrew Gierth Subject: Re: Trigger behaviour not as stated In-reply-to: References: <20171129193934.27108.30796@wrigleys.postgresql.org> <20180124181008.GK17109@momjian.us> <20180124220701.GP17109@momjian.us> Comments: In-reply-to Thomas Munro message dated "Sun, 28 Jan 2018 23:19:47 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28237.1517167118.1@sss.pgh.pa.us> Date: Sun, 28 Jan 2018 14:18:38 -0500 Message-ID: <28238.1517167118@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Munro writes: > On Thu, Jan 25, 2018 at 11:07 AM, Bruce Momjian wrote: >> ... The attached patch updates the docs to say >> statement-level triggers fire on the "referenced" table, while row-level >> triggers fire only on the "affected" table, (vs. all affected tables) >> even if they are not referenced in the query. I would backpatch this to >> PG 10. > I was trying to convey that, but it does seem a little terse and > cryptic. Your addition of "referenced" and "only" make it clearer. Hm, the first part of Bruce's change seems fine, but I think this wording: ... In contrast, ! row-level triggers are fired only on affected partitions or child tables, ! even if they are not referenced in the query. is still confusing. How about something like In contrast, row-level triggers are fired for each actual row change, including changes in partitions or child tables that are not directly named in the query. Possibly "row operation" would be better than "row change". regards, tom lane