pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: neil@fairwindsoft.com
Cc: pgsql-docs@postgresql.org, Andres Freund <andres@anarazel.de>
Cc: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Cc: Peter Geoghegan <pg@bowt.ie>
Subject: Re: Confusing Trigger Docs.
Date: Thu, 31 Aug 2017 09:25:44 -0400
Message-ID: <20170831132544.GC2355@momjian.us> (raw)
In-Reply-To: <20170703200710.27956.64565@wrigleys.postgresql.org>
References: <20170703200710.27956.64565@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>


[ This time with the right CCs.]

Can someone help with this text?  I think the author is right that it
needs correction or clarification.

---------------------------------------------------------------------------

On Mon, Jul  3, 2017 at 08:07:10PM +0000, neil@fairwindsoft.com wrote:
> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/9.6/static/trigger-definition.html
> Description:
> 
> https://www.postgresql.org/docs/devel/static/trigger-definition.html
> 
> This sentence:
> 
> &quot;If an INSERT contains an ON CONFLICT DO UPDATE clause, it is possible that
> the effects of all row-level BEFORE INSERT triggers and all row-level BEFORE
> UPDATE triggers can both be applied in a way that is apparent from the final
> state of the updated row, if an EXCLUDED column is referenced.&quot;
> 
> is very hard to digest.
> 
> Should &quot;is apparent&quot; really be &quot;is not apparent&quot;?  If not, what does &quot;is
> apparent&quot; mean and why is this statement here?
> 
> Then
> 
> &quot;There need not be an EXCLUDED column reference for both sets of row-level
> BEFORE triggers to execute, though.&quot;
> 
> Does this mean that both row level BEFORE INSERT and BEFORE UPDATE triggers
> are always executed when ON CONFLICT DO UPDATE clause is present?  Or is
> there some circumstance where they are not?
> 
> If so, does this also mean that if I have a single trigger defined as BEFORE
> UPDATE OR INSERT that this trigger will fire twice?
> 
> -- 
> Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-docs

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


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



view thread (13+ messages)  latest in thread

Message-ID: <20170831132544.GC2355@momjian.us>
Permalink:  ../20170831132544.GC2355@momjian.us/
Also on:    postgresql.org/message-id/20170831132544.GC2355@momjian.us

 · 

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: pgsql-docs@postgresql.org
  Cc: bruce@momjian.us, neil@fairwindsoft.com, andres@anarazel.de, heikki.linnakangas@iki.fi, pg@bowt.ie
  Subject: Re: Confusing Trigger Docs.
  In-Reply-To: <20170831132544.GC2355@momjian.us>

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

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