Notice on BEFORE triggers and INSERT .. ON CONFLICT

Поиск
Список
Период
Сортировка
От sergey@melekhin.me
Тема Notice on BEFORE triggers and INSERT .. ON CONFLICT
Дата
Msg-id 20160923044715.1507.29275@wrigleys.postgresql.org
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: atiris@gmail.com
Дата:
Сообщение: Missing type in example
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Missing type in example