doc: improve description of privileges for MERGE and update glossary.
authorDean Rasheed
Sat, 18 Nov 2023 12:41:23 +0000 (12:41 +0000)
committerDean Rasheed
Sat, 18 Nov 2023 12:41:23 +0000 (12:41 +0000)
On the MERGE page, the description of the privileges required could be
taken to imply that the SELECT privilege is required on all columns of
the data source, whereas actually it is only required on the columns
referred to by conditions or expressions in the MERGE command. Re-word
it to make that a little clearer, and mention expressions as well as
conditions.

Also, add a glossary entry for MERGE, and nearby on the glossary page,
mention MERGE in the list of commands that cannot update a
materialized view.

Noted by Jian He. Patch by me, reviewed by Jian He.

Discussion: https://postgr.es/m/CACJufxHuSoRXKwr0MtSFLXuT2nFVWcVfEWhxg7qdP9h%2Bs3a%2BUw%40mail.gmail.com

doc/src/sgml/glossary.sgml
doc/src/sgml/ref/merge.sgml

index fe8def41d04829449699cbd5c906f655b3020101..5815fa44710f1a1fea73aa073cb22f5016dd33bf 100644 (file)
      (just like a view),
      but stores data in the same way that a
      table does. It cannot be
-     modified via INSERTUPDATE, or
-     DELETE operations.
+     modified via INSERTUPDATE,
+     DELETE, or MERGE operations.
     
     
      For more information, see
    
   
 
+  
+   Merge
+   
+    
+     An SQL command used to conditionally add, modify,
+     or remove rows
+     in a given table,
+     using data from a source
+     relation.
+    
+    
+     For more information, see
+     .
+    
+   
+  
+
   
    Multi-version concurrency control (MVCC)
    
index 0f61d472cd8251e8e56cd73a6827deb93798eb35..d5ad930eef252a7743756c7734c1767f4cfdc936 100644 (file)
@@ -102,14 +102,14 @@ DELETE
    that are referred to in the SET clause.
    If you specify an insert action, you must have the INSERT
    privilege on the target_table_name.
-   If you specify an delete action, you must have the DELETE
+   If you specify a delete action, you must have the DELETE
    privilege on the target_table_name.
    Privileges are tested once at statement start and are checked
    whether or not particular WHEN clauses are executed.
-   You will require the SELECT privilege on the
-   data_source and any column(s)
-   of the target_table_name
-   referred to in a condition.
+   You will require the SELECT privilege on any column(s)
+   of the data_source and
+   target_table_name referred to
+   in any condition or expression.