From: Bruce Momjian Date: Fri, 1 Nov 2024 20:20:27 +0000 (-0400) Subject: doc: remove useless MERGE example X-Git-Tag: REL_18_BETA1~1566 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a9effe45ee96f7105ba19285eff18a634bfee01;p=thirdparty%2Fpostgresql.git 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 --- diff --git a/doc/src/sgml/ref/merge.sgml b/doc/src/sgml/ref/merge.sgml index 97b34b9fcaf..d80a5c5cc9b 100644 --- a/doc/src/sgml/ref/merge.sgml +++ b/doc/src/sgml/ref/merge.sgml @@ -707,23 +707,6 @@ WHEN NOT MATCHED THEN - - Notice that this would be exactly equivalent to the following - statement because the MATCHED result does not change - during execution. - - -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); - - - 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