public inbox for [email protected]  
help / color / mirror / Atom feed
Small patch for "CREATE TRIGGER" documentation
2+ messages / 2 participants
[nested] [flat]

* Small patch for "CREATE TRIGGER" documentation
@ 2013-03-07 00:27 Ian Lawrence Barwick <[email protected]>
  2013-03-08 20:33 ` Re: Small patch for "CREATE TRIGGER" documentation Robert Haas <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Ian Lawrence Barwick @ 2013-03-07 00:27 UTC (permalink / raw)
  To: pgsql-docs; pgsql-hackers <[email protected]>

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>


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Small patch for "CREATE TRIGGER" documentation
  2013-03-07 00:27 Small patch for "CREATE TRIGGER" documentation Ian Lawrence Barwick <[email protected]>
@ 2013-03-08 20:33 ` Robert Haas <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Haas @ 2013-03-08 20:33 UTC (permalink / raw)
  To: Ian Lawrence Barwick <[email protected]>; +Cc: pgsql-docs

On Wed, Mar 6, 2013 at 7:27 PM, Ian Lawrence Barwick <[email protected]> wrote:
> 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.

I guess I prefer the current version, personally.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2013-03-08 20:33 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-03-07 00:27 Small patch for "CREATE TRIGGER" documentation Ian Lawrence Barwick <[email protected]>
2013-03-08 20:33 ` Robert Haas <[email protected]>

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