From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | neil(at)fairwindsoft(dot)com |
Cc: | pgsql-docs(at)postgresql(dot)org, Andres Freund <andres(at)anarazel(dot)de>, Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>, Peter Geoghegan <pg(at)bowt(dot)ie> |
Subject: | Re: Confusing Trigger Docs. |
Date: | 2017-08-31 13:25:44 |
Message-ID: | 20170831132544.GC2355@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-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(at)fairwindsoft(dot)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:
>
> "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."
>
> is very hard to digest.
>
> Should "is apparent" really be "is not apparent"? If not, what does "is
> apparent" mean and why is this statement here?
>
> Then
>
> "There need not be an EXCLUDED column reference for both sets of row-level
> BEFORE triggers to execute, though."
>
> 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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-docs
--
Bruce Momjian <bruce(at)momjian(dot)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 +
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2017-08-31 16:22:22 | Re: Confusing Trigger Docs. |
Previous Message | Bruce Momjian | 2017-08-31 13:23:24 | Re: Confusing Trigger Docs. |