1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

WITH support in MERGE

Author: Peter Geoghegan
Recursive support removed, no tests
Docs added by me
This commit is contained in:
Simon Riggs
2018-04-03 12:13:59 +01:00
parent 83454e3c2b
commit aa3faa3c7a
10 changed files with 232 additions and 9 deletions

View File

@ -18,6 +18,7 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
[ WITH <replaceable class="parameter">with_query</replaceable> [, ...] ]
MERGE INTO <replaceable class="parameter">target_table_name</replaceable> [ [ AS ] <replaceable class="parameter">target_alias</replaceable> ]
USING <replaceable class="parameter">data_source</replaceable>
ON <replaceable class="parameter">join_condition</replaceable>
@ -391,6 +392,18 @@ DELETE
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">with_query</replaceable></term>
<listitem>
<para>
The <literal>WITH</literal> clause allows you to specify one or more
subqueries that can be referenced by name in the <command>MERGE</command>
query. See <xref linkend="queries-with"/> and <xref linkend="sql-select"/>
for details.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
@ -597,7 +610,7 @@ WHEN MATCHED THEN
This command conforms to the <acronym>SQL</acronym> standard.
</para>
<para>
The DO NOTHING action is an extension to the <acronym>SQL</acronym> standard.
The WITH clause and DO NOTHING action are extensions to the <acronym>SQL</acronym> standard.
</para>
</refsect1>
</refentry>