Notice on BEFORE triggers and INSERT .. ON CONFLICT - Mailing list pgsql-docs

From sergey@melekhin.me
Subject Notice on BEFORE triggers and INSERT .. ON CONFLICT
Date
Msg-id 20160923044715.1507.29275@wrigleys.postgresql.org
Whole thread Raw
List pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.5/static/plpgsql-trigger.html
Description:

Before insert on update or insert trigger will fire twice when insert .. on
conflict do update does the update part. First with TG_OP='INSERT' and then
with TG_OP='UPDATE'.
It is not very obvious behaviour, and I think it deserves a notice in
documentation.

Here is an example:
https://gist.github.com/C-Pro/ff0000aaeee469e8f57f232de422bba0

pgsql-docs by date:

Previous
From: atiris@gmail.com
Date:
Subject: Missing type in example
Next
From: Tom Lane
Date:
Subject: Re: Missing type in example