From 7cf8a5c302735d193dcf901b87e03e324903c632 Mon Sep 17 00:00:00 2001
From: Simon Riggs
Date: Mon, 2 Apr 2018 21:34:15 +0100
Subject: Revert "Modified files for MERGE"
This reverts commit 354f13855e6381d288dfaa52bcd4f2cb0fd4a5eb.
---
doc/src/sgml/libpq.sgml | 8 +++-----
doc/src/sgml/mvcc.sgml | 28 +---------------------------
doc/src/sgml/plpgsql.sgml | 3 +--
doc/src/sgml/ref/allfiles.sgml | 1 -
doc/src/sgml/ref/create_policy.sgml | 7 -------
doc/src/sgml/ref/insert.sgml | 11 +----------
doc/src/sgml/reference.sgml | 1 -
doc/src/sgml/trigger.sgml | 20 --------------------
8 files changed, 6 insertions(+), 73 deletions(-)
(limited to 'doc/src')
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 8729ccd5c5a..943adfef774 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -3917,11 +3917,9 @@ char *PQcmdTuples(PGresult *res);
PGresult. This function can only be used following
the execution of a SELECT, CREATE TABLE AS,
INSERT, UPDATE, DELETE,
- MERGE, MOVE, FETCH,
- or COPY statement, or an EXECUTE of a
- prepared query that contains an INSERT,
- UPDATE, DELETE
- or MERGE statement.
+ MOVE, FETCH, or COPY statement,
+ or an EXECUTE of a prepared query that contains an
+ INSERT, UPDATE, or DELETE statement.
If the command that generated the PGresult was anything
else, PQcmdTuples returns an empty string. The caller
should not free the return value directly. It will be freed when
diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml
index 0e3e89af560..24613e3c754 100644
--- a/doc/src/sgml/mvcc.sgml
+++ b/doc/src/sgml/mvcc.sgml
@@ -422,31 +422,6 @@ COMMIT;
11, which no longer matches the criteria.
-
- The MERGE allows the user to specify various combinations
- of INSERT, UPDATE or
- DELETE subcommands. A MERGE command
- with both INSERT and UPDATE
- subcommands looks similar to INSERT with an
- ON CONFLICT DO UPDATE clause but does not guarantee
- that either INSERT and UPDATE will occur.
-
- If MERGE attempts an UPDATE or DELETE and the row is concurrently updated
- but the join condition still passes for the current target and the current
- source tuple, then MERGE will behave the same as the UPDATE or DELETE commands
- and perform its action on the latest version of the row, using standard
- EvalPlanQual. MERGE actions can be conditional, so conditions must be
- re-evaluated on the latest row, starting from the first action.
-
- On the other hand, if the row is concurrently updated or deleted so that
- the join condition fails, then MERGE will execute a NOT MATCHED action, if it
- exists and the AND WHEN qual evaluates to true.
-
- If MERGE attempts an INSERT and a unique index is present and a duplicate
- row is concurrently inserted then a uniqueness violation is raised. MERGE
- does not attempt to avoid the ERROR by attempting an UPDATE.
-
-
Because Read Committed mode starts each command with a new snapshot
that includes all transactions committed up to that instant,
@@ -925,8 +900,7 @@ ERROR: could not serialize access due to read/write dependencies among transact
The commands UPDATE,
- DELETE, INSERT and
- MERGE
+ DELETE, and INSERT
acquire this lock mode on the target table (in addition to
ACCESS SHARE locks on any other referenced
tables). In general, this lock mode will be acquired by any
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 59f6112b07c..5b2aac618e3 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -1246,7 +1246,7 @@ EXECUTE format('SELECT count(*) FROM %I '
Another restriction on parameter symbols is that they only work in
SELECT, INSERT, UPDATE, and
- DELETE and MERGE commands. In other statement
+ DELETE commands. In other statement
types (generically called utility statements), you must insert
values textually even if they are just data values.
@@ -1529,7 +1529,6 @@ GET DIAGNOSTICS integer_var = ROW_COUNT;
UPDATE, INSERT, and DELETE
- and MERGE
statements set FOUND true if at least one
row is affected, false if no row is affected.
diff --git a/doc/src/sgml/ref/allfiles.sgml b/doc/src/sgml/ref/allfiles.sgml
index 4e01e5641cf..22e68932115 100644
--- a/doc/src/sgml/ref/allfiles.sgml
+++ b/doc/src/sgml/ref/allfiles.sgml
@@ -159,7 +159,6 @@ Complete list of usable sgml source files in this directory.
-
diff --git a/doc/src/sgml/ref/create_policy.sgml b/doc/src/sgml/ref/create_policy.sgml
index 32f39a48ba9..0e35b0ef43e 100644
--- a/doc/src/sgml/ref/create_policy.sgml
+++ b/doc/src/sgml/ref/create_policy.sgml
@@ -94,13 +94,6 @@ CREATE POLICY name ON default deny policy is assumed, so that no rows will
be visible or updatable.
-
-
- No separate policy exists for MERGE. Instead policies
- defined for SELECT, INSERT,
- UPDATE and DELETE are applied
- while executing MERGE, depending on the actions that are activated.
-
diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml
index da294aaa46a..62e142fd8ef 100644
--- a/doc/src/sgml/ref/insert.sgml
+++ b/doc/src/sgml/ref/insert.sgml
@@ -579,13 +579,6 @@ INSERT oid count
-
-
- You may also wish to consider using MERGE, since that
- allows mixed INSERT, UPDATE and
- DELETE within a single statement.
- See .
-
@@ -756,9 +749,7 @@ INSERT INTO distributors (did, dname) VALUES (10, 'Conrad International')
Also, the case in
which a column name list is omitted, but not all the columns are
filled from the VALUES clause or query,
- is disallowed by the standard. If you prefer a more SQL Standard
- conforming statement than ON CONFLICT, see
- .
+ is disallowed by the standard.
diff --git a/doc/src/sgml/reference.sgml b/doc/src/sgml/reference.sgml
index ef2270c4673..d27fb414f7c 100644
--- a/doc/src/sgml/reference.sgml
+++ b/doc/src/sgml/reference.sgml
@@ -186,7 +186,6 @@
&listen;
&load;
&lock;
- &merge;
&move;
¬ify;
&prepare;
diff --git a/doc/src/sgml/trigger.sgml b/doc/src/sgml/trigger.sgml
index cce58fbf1d0..c43dbc9786e 100644
--- a/doc/src/sgml/trigger.sgml
+++ b/doc/src/sgml/trigger.sgml
@@ -182,26 +182,6 @@
will be fired.
-
- No separate triggers are defined for MERGE. Instead,
- statement-level or row-level UPDATE,
- DELETE and INSERT triggers are fired
- depending on what actions are specified in the MERGE query
- and what actions are activated.
-
-
-
- While running a MERGE command, statement-level
- BEFORE and AFTER triggers are fired for
- events specified in the actions of the MERGE command,
- irrespective of whether the action is finally activated or not. This is same as
- an UPDATE statement that updates no rows, yet
- statement-level triggers are fired. The row-level triggers are fired only
- when a row is actually updated, inserted or deleted. So it's perfectly legal
- that while statement-level triggers are fired for certain type of action, no
- row-level triggers are fired for the same kind of action.
-
-
Trigger functions invoked by per-statement triggers should always
return NULL. Trigger functions invoked by per-row
--
cgit v1.2.3