On Tue, Jun 16, 2020 at 01:39:45PM -0400, Tom Lane wrote:
> Bruce Momjian <br...@momjian.us> 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.

OK, I didn't think there was enough desire to put it its own paragraph,
but I like the idea of mentioning all of the trigger functions;  patch
attached.

-- 
  Bruce Momjian  <br...@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee

diff --git a/doc/src/sgml/ref/create_trigger.sgml b/doc/src/sgml/ref/create_trigger.sgml
index 303881fcfb..289dd1d9da 100644
--- a/doc/src/sgml/ref/create_trigger.sgml
+++ b/doc/src/sgml/ref/create_trigger.sgml
@@ -457,6 +457,12 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</
    value did not change.
   </para>
 
+  <para>
+   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 <xref linkend="functions-trigger"/>.
+  </para>
+
   <para>
    In a <literal>BEFORE</literal> trigger, the <literal>WHEN</literal> condition is
    evaluated just before the function is or would be executed, so using

Reply via email to