Doc: Fix various inconsistencies

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
This commit is contained in:
Michael Paquier 2019-10-16 13:10:31 +09:00
parent 6d3fe6b6bf
commit dbefa96f8e
4 changed files with 15 additions and 15 deletions

View 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 dynamically from one version to the next, you should provide
<firstterm>update scripts</firstterm> that make the necessary changes to go from <firstterm>update scripts</firstterm> that make the necessary changes to go from
one version to the next. Update scripts have names following the pattern one version to the next. Update scripts have names following the pattern
<literal><replaceable>extension</replaceable>--<replaceable>oldversion</replaceable>--<replaceable>newversion</replaceable>.sql</literal> <literal><replaceable>extension</replaceable>--<replaceable>old_version</replaceable>--<replaceable>target_version</replaceable>.sql</literal>
(for example, <literal>foo--1.0--1.1.sql</literal> contains the commands to modify (for example, <literal>foo--1.0--1.1.sql</literal> contains the commands to modify
version <literal>1.0</literal> of extension <literal>foo</literal> into version version <literal>1.0</literal> of extension <literal>foo</literal> into version
<literal>1.1</literal>). <literal>1.1</literal>).

View File

@ -1015,22 +1015,22 @@ COPY <replaceable class="parameter">table_name</replaceable> [ ( <replaceable cl
FROM { '<replaceable class="parameter">filename</replaceable>' | STDIN } FROM { '<replaceable class="parameter">filename</replaceable>' | STDIN }
[ [ WITH ] [ [ WITH ]
[ BINARY ] [ BINARY ]
[ DELIMITER [ AS ] '<replaceable class="parameter">delimiter</replaceable>' ] [ DELIMITER [ AS ] '<replaceable class="parameter">delimiter_character</replaceable>' ]
[ NULL [ AS ] '<replaceable class="parameter">null string</replaceable>' ] [ NULL [ AS ] '<replaceable class="parameter">null_string</replaceable>' ]
[ CSV [ HEADER ] [ CSV [ HEADER ]
[ QUOTE [ AS ] '<replaceable class="parameter">quote</replaceable>' ] [ QUOTE [ AS ] '<replaceable class="parameter">quote_character</replaceable>' ]
[ ESCAPE [ AS ] '<replaceable class="parameter">escape</replaceable>' ] [ ESCAPE [ AS ] '<replaceable class="parameter">escape_character</replaceable>' ]
[ FORCE NOT NULL <replaceable class="parameter">column_name</replaceable> [, ...] ] ] ] [ FORCE NOT NULL <replaceable class="parameter">column_name</replaceable> [, ...] ] ] ]
COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable class="parameter">column_name</replaceable> [, ...] ) ] | ( <replaceable class="parameter">query</replaceable> ) } COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable class="parameter">column_name</replaceable> [, ...] ) ] | ( <replaceable class="parameter">query</replaceable> ) }
TO { '<replaceable class="parameter">filename</replaceable>' | STDOUT } TO { '<replaceable class="parameter">filename</replaceable>' | STDOUT }
[ [ WITH ] [ [ WITH ]
[ BINARY ] [ BINARY ]
[ DELIMITER [ AS ] '<replaceable class="parameter">delimiter</replaceable>' ] [ DELIMITER [ AS ] '<replaceable class="parameter">delimiter_character</replaceable>' ]
[ NULL [ AS ] '<replaceable class="parameter">null string</replaceable>' ] [ NULL [ AS ] '<replaceable class="parameter">null_string</replaceable>' ]
[ CSV [ HEADER ] [ CSV [ HEADER ]
[ QUOTE [ AS ] '<replaceable class="parameter">quote</replaceable>' ] [ QUOTE [ AS ] '<replaceable class="parameter">quote_character</replaceable>' ]
[ ESCAPE [ AS ] '<replaceable class="parameter">escape</replaceable>' ] [ ESCAPE [ AS ] '<replaceable class="parameter">escape_character</replaceable>' ]
[ FORCE QUOTE { <replaceable class="parameter">column_name</replaceable> [, ...] | * } ] ] ] [ FORCE QUOTE { <replaceable class="parameter">column_name</replaceable> [, ...] | * } ] ] ]
</synopsis> </synopsis>
@ -1046,13 +1046,13 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
<synopsis> <synopsis>
COPY [ BINARY ] <replaceable class="parameter">table_name</replaceable> COPY [ BINARY ] <replaceable class="parameter">table_name</replaceable>
FROM { '<replaceable class="parameter">filename</replaceable>' | STDIN } FROM { '<replaceable class="parameter">filename</replaceable>' | STDIN }
[ [USING] DELIMITERS '<replaceable class="parameter">delimiter</replaceable>' ] [ [USING] DELIMITERS '<replaceable class="parameter">delimiter_character</replaceable>' ]
[ WITH NULL AS '<replaceable class="parameter">null string</replaceable>' ] [ WITH NULL AS '<replaceable class="parameter">null_string</replaceable>' ]
COPY [ BINARY ] <replaceable class="parameter">table_name</replaceable> COPY [ BINARY ] <replaceable class="parameter">table_name</replaceable>
TO { '<replaceable class="parameter">filename</replaceable>' | STDOUT } TO { '<replaceable class="parameter">filename</replaceable>' | STDOUT }
[ [USING] DELIMITERS '<replaceable class="parameter">delimiter</replaceable>' ] [ [USING] DELIMITERS '<replaceable class="parameter">delimiter_character</replaceable>' ]
[ WITH NULL AS '<replaceable class="parameter">null string</replaceable>' ] [ WITH NULL AS '<replaceable class="parameter">null_string</replaceable>' ]
</synopsis></para> </synopsis></para>
</refsect1> </refsect1>
</refentry> </refentry>

View File

@ -165,7 +165,7 @@ PREPARE <replaceable class="parameter">name</replaceable> [ ( <replaceable class
To examine the query plan <productname>PostgreSQL</productname> is using To examine the query plan <productname>PostgreSQL</productname> is using
for a prepared statement, use <xref linkend="sql-explain"/>, for example for a prepared statement, use <xref linkend="sql-explain"/>, for example
<programlisting> <programlisting>
EXPLAIN EXECUTE <replaceable>stmt_name</replaceable>(<replaceable>parameter_values</replaceable>); EXPLAIN EXECUTE <replaceable>name</replaceable>(<replaceable>parameter_values</replaceable>);
</programlisting> </programlisting>
If a generic plan is in use, it will contain parameter symbols If a generic plan is in use, it will contain parameter symbols
<literal>$<replaceable>n</replaceable></literal>, while a custom plan <literal>$<replaceable>n</replaceable></literal>, while a custom plan

View File

@ -64,7 +64,7 @@ RESET ROLE
<para> <para>
Using this command, it is possible to either add privileges or restrict Using this command, it is possible to either add privileges or restrict
one's privileges. If the session user role has the <literal>INHERITS</literal> one's privileges. If the session user role has the <literal>INHERIT</literal>
attribute, then it automatically has all the privileges of every role that attribute, then it automatically has all the privileges of every role that
it could <command>SET ROLE</command> to; in this case <command>SET ROLE</command> it could <command>SET ROLE</command> to; in this case <command>SET ROLE</command>
effectively drops all the privileges assigned directly to the session user effectively drops all the privileges assigned directly to the session user