public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ian Lawrence Barwick <[email protected]>
To: pgsql-docs <[email protected]>
To: pgsql-hackers <[email protected]>
Subject: Small patch for "CREATE TRIGGER" documentation
Date: Thu, 7 Mar 2013 09:27:06 +0900
Message-ID: <CAB8KJ=infML6Ac9VAt_FjOvsN5hv=ZW+gGC7kR-XsMfzPvi=sQ@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-docs>

I found this sentence somewhat confusing:

"It is possible for a column's value to change even when the trigger
is not fired,"

http://www.postgresql.org/docs/devel/static/sql-createtrigger.html#SQL-CREATETRIGGER-NOTES

More precise would be something along the lines "It is possible that
changes to the
column's value will not cause the trigger to be fired".

The attached patch hopefully rewords the entire paragraph for clarity.

Regards

Ian Barwick


-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Attachments:

  [application/octet-stream] create-trigger-doc-notes-2013-03-07.patch (1.5K, 2-create-trigger-doc-notes-2013-03-07.patch)
  download | inline diff:
diff --git a/doc/src/sgml/ref/create_trigger.sgml b/doc/src/sgml/ref/create_trigger.sgml
new file mode 100644
index d9817e4..37d339d
*** a/doc/src/sgml/ref/create_trigger.sgml
--- b/doc/src/sgml/ref/create_trigger.sgml
*************** UPDATE OF <replaceable>column_name1</rep
*** 374,385 ****
     A column-specific trigger (one defined using the <literal>UPDATE OF
     <replaceable>column_name</replaceable></literal> syntax) will fire when any
     of its columns are listed as targets in the <command>UPDATE</>
!    command's <literal>SET</> list.  It is possible for a column's value
!    to change even when the trigger is not fired, because changes made to the
!    row's contents by <literal>BEFORE UPDATE</> triggers are not considered.
!    Conversely, a command such as <literal>UPDATE ... SET x = x ...</>
!    will fire a trigger on column <literal>x</>, even though the column's
!    value did not change.
    </para>
  
    <para>
--- 374,384 ----
     A column-specific trigger (one defined using the <literal>UPDATE OF
     <replaceable>column_name</replaceable></literal> syntax) will fire when any
     of its columns are listed as targets in the <command>UPDATE</>
!    command's <literal>SET</> list. Note that the trigger will fire even if the 
!    specified column's value did not change, for example when issuing a command 
!    such as <literal>UPDATE ... SET x = x ...</>. However, changes made to the
!    specified column by any <literal>BEFORE UPDATE</> triggers will not cause
!    the trigger to fire.
    </para>
  
    <para>


view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Small patch for "CREATE TRIGGER" documentation
  In-Reply-To: <CAB8KJ=infML6Ac9VAt_FjOvsN5hv=ZW+gGC7kR-XsMfzPvi=sQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox