1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Modified files for MERGE

This commit is contained in:
Simon Riggs
2018-04-02 21:12:47 +01:00
parent e6597dc353
commit 354f13855e
82 changed files with 2570 additions and 165 deletions

View File

@@ -182,6 +182,26 @@
will be fired.
</para>
<para>
No separate triggers are defined for <command>MERGE</command>. Instead,
statement-level or row-level <command>UPDATE</command>,
<command>DELETE</command> and <command>INSERT</command> triggers are fired
depending on what actions are specified in the <command>MERGE</command> query
and what actions are activated.
</para>
<para>
While running a <command>MERGE</command> command, statement-level
<literal>BEFORE</literal> and <literal>AFTER</literal> triggers are fired for
events specified in the actions of the <command>MERGE</command> command,
irrespective of whether the action is finally activated or not. This is same as
an <command>UPDATE</command> statement that updates no rows, yet
statement-level triggers are fired. The row-level triggers are fired only
when a row is actually updated, inserted or deleted. So it's perfectly legal
that while statement-level triggers are fired for certain type of action, no
row-level triggers are fired for the same kind of action.
</para>
<para>
Trigger functions invoked by per-statement triggers should always
return <symbol>NULL</symbol>. Trigger functions invoked by per-row