doc: remove useless MERGE example

Reported-by: dwayne.towell@gmail.com

Discussion: https://postgr.es/m/167699245721.1902146.6479762301617101634@wrigleys.postgresql.org

Backpatch-through: master
This commit is contained in:
Bruce Momjian 2024-11-01 16:20:27 -04:00
parent e1a76db1a8
commit 4a9effe45e

View File

@ -707,23 +707,6 @@ WHEN NOT MATCHED THEN
</programlisting>
</para>
<para>
Notice that this would be exactly equivalent to the following
statement because the <literal>MATCHED</literal> result does not change
during execution.
<programlisting>
MERGE INTO customer_account ca
USING (SELECT customer_id, transaction_value FROM recent_transactions) AS t
ON t.customer_id = ca.customer_id
WHEN MATCHED THEN
UPDATE SET balance = balance + transaction_value
WHEN NOT MATCHED THEN
INSERT (customer_id, balance)
VALUES (t.customer_id, t.transaction_value);
</programlisting>
</para>
<para>
Attempt to insert a new stock item along with the quantity of stock. If
the item already exists, instead update the stock count of the existing