Doc: Fix various inconsistencies
authorMichael Paquier
Wed, 16 Oct 2019 04:09:52 +0000 (13:09 +0900)
committerMichael Paquier
Wed, 16 Oct 2019 04:09:52 +0000 (13:09 +0900)
This fixes multiple areas of the documentation:
- COPY for its past compatibility section.
- SET ROLE mentioning INHERITS instead of INHERIT
- PREPARE referring to stmt_name, that is not present.
- Extension documentation about format name with upgrade scripts.

Backpatch down to 9.4 for the relevant parts.

Author: Alexander Lakhin
Discussion: https://postgr.es/m/bf95233a-9943-b341-e2ff-a860c28af481@gmail.com
Backpatch-through: 9.4

doc/src/sgml/extend.sgml
doc/src/sgml/ref/copy.sgml
doc/src/sgml/ref/prepare.sgml
doc/src/sgml/ref/set_role.sgml

index 8dc2b893f7eb353821fab83866e1c1087a36e024..a3046f22d050f8f356d07a22a7d22419a18f5f3c 100644 (file)
@@ -856,7 +856,7 @@ SELECT pg_catalog.pg_extension_config_dump('my_config', 'WHERE NOT standard_entr
      dynamically from one version to the next, you should provide
      update scripts that make the necessary changes to go from
      one version to the next.  Update scripts have names following the pattern
-     extension--oldversion--newversion.sql
+     extension--old_version--target_version.sql
      (for example, foo--1.0--1.1.sql contains the commands to modify
      version 1.0 of extension foo into version
      1.1).
index 5e2992ddacc5f42a9d1fd98011fd6acaaa0416cc..3e6f9cd5324b39ca1ed4f9e684a4ea12900ab4ed 100644 (file)
@@ -1015,22 +1015,22 @@ COPY table_name [ ( 
     FROM { 'filename' | STDIN }
     [ [ WITH ]
           [ BINARY ]
-          [ DELIMITER [ AS ] 'delimiter' ]
-          [ NULL [ AS ] 'null string' ]
+          [ DELIMITER [ AS ] 'delimiter_character' ]
+          [ NULL [ AS ] 'null_string' ]
           [ CSV [ HEADER ]
-                [ QUOTE [ AS ] 'quote' ]
-                [ ESCAPE [ AS ] 'escape' ]
+                [ QUOTE [ AS ] 'quote_character' ]
+                [ ESCAPE [ AS ] 'escape_character' ]
                 [ FORCE NOT NULL column_name [, ...] ] ] ]
 
 COPY { table_name [ ( column_name [, ...] ) ] | ( query ) }
     TO { 'filename' | STDOUT }
     [ [ WITH ]
           [ BINARY ]
-          [ DELIMITER [ AS ] 'delimiter' ]
-          [ NULL [ AS ] 'null string' ]
+          [ DELIMITER [ AS ] 'delimiter_character' ]
+          [ NULL [ AS ] 'null_string' ]
           [ CSV [ HEADER ]
-                [ QUOTE [ AS ] 'quote' ]
-                [ ESCAPE [ AS ] 'escape' ]
+                [ QUOTE [ AS ] 'quote_character' ]
+                [ ESCAPE [ AS ] 'escape_character' ]
                 [ FORCE QUOTE { column_name [, ...] | * } ] ] ]
 
 
@@ -1046,13 +1046,13 @@ COPY { table_name [ ( 
 
 COPY [ BINARY ] table_name
     FROM { 'filename' | STDIN }
-    [ [USING] DELIMITERS 'delimiter' ]
-    [ WITH NULL AS 'null string' ]
+    [ [USING] DELIMITERS 'delimiter_character' ]
+    [ WITH NULL AS 'null_string' ]
 
 COPY [ BINARY ] table_name
     TO { 'filename' | STDOUT }
-    [ [USING] DELIMITERS 'delimiter' ]
-    [ WITH NULL AS 'null string' ]
+    [ [USING] DELIMITERS 'delimiter_character' ]
+    [ WITH NULL AS 'null_string' ]
 
  
 
index 9f786cd3adc28efb89b8647b90abdcb7f1fc2eee..4e5e96a4014d09c29f135fdfe92bc2bddc0f1fc6 100644 (file)
@@ -165,7 +165,7 @@ PREPARE name [ ( 
    To examine the query plan PostgreSQL is using
    for a prepared statement, use , for example
 
-EXPLAIN EXECUTE stmt_name(parameter_values);
+EXPLAIN EXECUTE name(parameter_values);
 
    If a generic plan is in use, it will contain parameter symbols
    $n, while a custom plan
index 9ab0d6af04cb64a5ca6f77ad8bec275da4876453..a4842f363c8be325f3955e59adaded43e6752e0d 100644 (file)
@@ -64,7 +64,7 @@ RESET ROLE
 
   
    Using this command, it is possible to either add privileges or restrict
-   one's privileges.  If the session user role has the INHERITS
+   one's privileges.  If the session user role has the INHERIT
    attribute, then it automatically has all the privileges of every role that
    it could SET ROLE to; in this case SET ROLE
    effectively drops all the privileges assigned directly to the session user