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 1jlFYu-0005bF-OR for pgsql-docs@arkaria.postgresql.org; Tue, 16 Jun 2020 17:39:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jlFYt-0007N2-37 for pgsql-docs@arkaria.postgresql.org; Tue, 16 Jun 2020 17:39:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlFYs-0007Mv-TO for pgsql-docs@lists.postgresql.org; Tue, 16 Jun 2020 17:39:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlFYq-0000Fx-OO for pgsql-docs@lists.postgresql.org; Tue, 16 Jun 2020 17:39:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 05GHdjTd1369891; Tue, 16 Jun 2020 13:39:45 -0400 From: Tom Lane To: Bruce Momjian cc: petermpallesen@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: Not using suppress_redundant_updates_trigger in sql-createtrigger.html#examples In-reply-to: <20200616164108.GA12171@momjian.us> References: <159195294959.673.5752624528747900508@wrigleys.postgresql.org> <20200616103644.GE31175@momjian.us> <1300920.1592316494@sss.pgh.pa.us> <20200616164108.GA12171@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Tue, 16 Jun 2020 12:41:08 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1369889.1592329185.1@sss.pgh.pa.us> Date: Tue, 16 Jun 2020 13:39:45 -0400 Message-ID: <1369890.1592329185@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Bruce Momjian writes: > I have developed the attached patch which is in a better direction. I still wish you wouldn't jam this topic into an only-marginally-related sentence. In the case at hand, the point that the existing text is making is that a no-op update will fire triggers. Which is not something that suppress_redundant_updates_trigger will suppress, so again it seems confusing to mention that in the same breath. I think that perhaps the right thing to do is add a new para to CREATE TRIGGER's "Notes" section, along the lines of There are a few built-in trigger functions that can be used to solve common problems without having to write your own trigger code. See Section 9.28. This would have the advantage of covering the other built-in triggers not only suppress_redundant_updates_trigger. regards, tom lane