From 18ad74bfc2b6d1a758eaab9d2332532f6abb074d Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 18 Mar 2022 11:44:16 +0100 Subject: [PATCH 1/2] fixup! MERGE SQL Command following SQL:2016 Add back serial commas. --- doc/src/sgml/libpq.sgml | 2 +- doc/src/sgml/mvcc.sgml | 2 +- doc/src/sgml/ref/create_policy.sgml | 2 +- doc/src/sgml/ref/insert.sgml | 2 +- doc/src/sgml/ref/merge.sgml | 6 +++--- doc/src/sgml/trigger.sgml | 2 +- src/include/nodes/execnodes.h | 2 +- src/include/nodes/pathnodes.h | 2 +- src/include/nodes/plannodes.h | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 5fcfb29a55..70233aa872 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -4128,7 +4128,7 @@ Retrieving Other Result Information MERGE, MOVE, FETCH, or COPY statement, or an EXECUTE of a prepared query that contains an INSERT, - UPDATE, DELETE + UPDATE, DELETE, or MERGE statement. If the command that generated the PGresult was anything else, returns an empty string. The caller diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml index 62451d297b..9b3061c03d 100644 --- a/doc/src/sgml/mvcc.sgml +++ b/doc/src/sgml/mvcc.sgml @@ -955,7 +955,7 @@ Table-Level Lock Modes The commands UPDATE, - DELETE, INSERT and + DELETE, INSERT, and MERGE acquire this lock mode on the target table (in addition to ACCESS SHARE locks on any other referenced diff --git a/doc/src/sgml/ref/create_policy.sgml b/doc/src/sgml/ref/create_policy.sgml index f45882814d..c8ecc06347 100644 --- a/doc/src/sgml/ref/create_policy.sgml +++ b/doc/src/sgml/ref/create_policy.sgml @@ -619,7 +619,7 @@ Notes No separate policy exists for MERGE. Instead, the policies defined for SELECT, INSERT, - UPDATE and DELETE are applied + UPDATE, and DELETE are applied while executing MERGE, depending on the actions that are performed. diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml index ad61d757af..41cafc8455 100644 --- a/doc/src/sgml/ref/insert.sgml +++ b/doc/src/sgml/ref/insert.sgml @@ -592,7 +592,7 @@ Notes You may also wish to consider using MERGE, since that - allows mixing INSERT, UPDATE and + allows mixing INSERT, UPDATE, and DELETE within a single statement. See . diff --git a/doc/src/sgml/ref/merge.sgml b/doc/src/sgml/ref/merge.sgml index 73778666e9..3a1823ceed 100644 --- a/doc/src/sgml/ref/merge.sgml +++ b/doc/src/sgml/ref/merge.sgml @@ -118,8 +118,8 @@ Description MERGE is not supported if the target_table_name is a - materialized view, foreign table or if it has any - RULEs defined on it. + materialized view, foreign table, or if it has any + rules defined on it. @@ -153,7 +153,7 @@ Parameters source_table_name - The name (optionally schema-qualified) of the source table, view or + The name (optionally schema-qualified) of the source table, view, or transition table. diff --git a/doc/src/sgml/trigger.sgml b/doc/src/sgml/trigger.sgml index 2662be243f..04e702a795 100644 --- a/doc/src/sgml/trigger.sgml +++ b/doc/src/sgml/trigger.sgml @@ -195,7 +195,7 @@ Overview of Trigger Behavior No separate triggers are defined for MERGE. Instead, statement-level or row-level UPDATE, - DELETE and INSERT triggers are fired + DELETE, and INSERT triggers are fired depending on (for statement-level triggers) what actions are specified in the MERGE query and (for row-level triggers) what actions are performed. diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 84e3ebf7a6..11e295890c 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -1222,7 +1222,7 @@ typedef struct ProjectSetState typedef struct ModifyTableState { PlanState ps; /* its first field is NodeTag */ - CmdType operation; /* INSERT, UPDATE, DELETE or MERGE */ + CmdType operation; /* INSERT, UPDATE, DELETE, or MERGE */ bool canSetTag; /* do we set the command tag/es_processed? */ bool mt_done; /* are we done? */ int mt_nrels; /* number of entries in resultRelInfo[] */ diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h index 1092c87434..365000bdcd 100644 --- a/src/include/nodes/pathnodes.h +++ b/src/include/nodes/pathnodes.h @@ -1885,7 +1885,7 @@ typedef struct ModifyTablePath { Path path; Path *subpath; /* Path producing source data */ - CmdType operation; /* INSERT, UPDATE, DELETE or MERGE */ + CmdType operation; /* INSERT, UPDATE, DELETE, or MERGE */ bool canSetTag; /* do we set the command tag/es_processed? */ Index nominalRelation; /* Parent RT index for use of EXPLAIN */ Index rootRelation; /* Root RT index, if target is partitioned */ diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index aa712cea71..50ef3dda05 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -218,7 +218,7 @@ typedef struct ProjectSet typedef struct ModifyTable { Plan plan; - CmdType operation; /* INSERT, UPDATE, DELETE or MERGE */ + CmdType operation; /* INSERT, UPDATE, DELETE, or MERGE */ bool canSetTag; /* do we set the command tag/es_processed? */ Index nominalRelation; /* Parent RT index for use of EXPLAIN */ Index rootRelation; /* Root RT index, if target is partitioned */ -- 2.35.1