summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2018-04-03 12:13:59 +0100
committerSimon Riggs <simon@2ndQuadrant.com>2018-04-03 12:13:59 +0100
commitaa3faa3c7a7a49b3318059ccaf79bc1886a64707 (patch)
tree1ccf93dda1b6481727d416f1dedfa556a704247a /doc/src
parent83454e3c2b28141c0db01c7d2027e01040df5249 (diff)
WITH support in MERGE
Author: Peter Geoghegan Recursive support removed, no tests Docs added by me
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/merge.sgml15
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/merge.sgml b/doc/src/sgml/ref/merge.sgml
index a7d44a39b68..0ca3d26ff48 100644
--- a/doc/src/sgml/ref/merge.sgml
+++ b/doc/src/sgml/ref/merge.sgml
@@ -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>