@@ -2064,8 +2064,8 @@ SELECT <replaceable>select_list</replaceable> FROM <replaceable>table_expression
2064
2064
in a <literal>WITH</literal> clause can be a <command>SELECT</command>,
2065
2065
<command>INSERT</command>, <command>UPDATE</command>, or <command>DELETE</command>; and the
2066
2066
<literal>WITH</literal> clause itself is attached to a primary statement that can
2067
- also be a <command>SELECT</command>, <command>INSERT</command>, <command>UPDATE</command>, or
2068
- <command>DELETE</command>.
2067
+ be a <command>SELECT</command>, <command>INSERT</command>, <command>UPDATE</command>,
2068
+ <command>DELETE</command>, or <command>MERGE</command> .
2069
2069
</para>
2070
2070
2071
2071
<sect2 id="queries-with-select">
@@ -2587,7 +2587,8 @@ SELECT * FROM w AS w1 JOIN w AS w2 ON w1.f = w2.f;
2587
2587
<para>
2588
2588
The examples above only show <literal>WITH</literal> being used with
2589
2589
<command>SELECT</command>, but it can be attached in the same way to
2590
- <command>INSERT</command>, <command>UPDATE</command>, or <command>DELETE</command>.
2590
+ <command>INSERT</command>, <command>UPDATE</command>,
2591
+ <command>DELETE</command>, or <command>MERGE</command>.
2591
2592
In each case it effectively provides temporary table(s) that can
2592
2593
be referred to in the main command.
2593
2594
</para>
@@ -2597,8 +2598,9 @@ SELECT * FROM w AS w1 JOIN w AS w2 ON w1.f = w2.f;
2597
2598
<title>Data-Modifying Statements in <literal>WITH</literal></title>
2598
2599
2599
2600
<para>
2600
- You can use data-modifying statements (<command>INSERT</command>,
2601
- <command>UPDATE</command>, or <command>DELETE</command>) in <literal>WITH</literal>. This
2601
+ You can use most data-modifying statements (<command>INSERT</command>,
2602
+ <command>UPDATE</command>, or <command>DELETE</command>, but not
2603
+ <command>MERGE</command>) in <literal>WITH</literal>. This
2602
2604
allows you to perform several different operations in the same query.
2603
2605
An example is:
2604
2606
0 commit comments