From fe2534e534c0572a71d6f0d2d51a2d058fc3524c Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter_e@gmx.net>
Date: Sun, 20 May 2012 01:15:55 +0300
Subject: [PATCH] Some reference page improvements

initdb: Add -T option
oid2name: Put options in some non-random order
pg_dump: Put --section option in the right place

And some additional markup and terminology improvements.
---
 doc/src/sgml/oid2name.sgml           | 31 ++++++++++++++---------
 doc/src/sgml/ref/initdb.sgml         |  3 ++-
 doc/src/sgml/ref/pg_basebackup.sgml  |  4 +--
 doc/src/sgml/ref/pg_controldata.sgml |  4 +--
 doc/src/sgml/ref/pg_dump.sgml        | 32 +++++++++++------------
 doc/src/sgml/ref/pg_receivexlog.sgml |  2 +-
 doc/src/sgml/ref/pg_resetxlog.sgml   | 38 ++++++++++++++--------------
 7 files changed, 61 insertions(+), 53 deletions(-)

diff --git a/doc/src/sgml/oid2name.sgml b/doc/src/sgml/oid2name.sgml
index a4c83925aba..30e8bb1972c 100644
--- a/doc/src/sgml/oid2name.sgml
+++ b/doc/src/sgml/oid2name.sgml
@@ -60,18 +60,23 @@
    <variablelist>
 
     <varlistentry>
-     <term><option>-o</option> <replaceable>oid</></term>
-     <listitem><para>show info for table with OID <replaceable>oid</></para></listitem>
+     <term><option>-f</option> <replaceable>filenode</></term>
+     <listitem><para>show info for table with filenode <replaceable>filenode</></para></listitem>
     </varlistentry>
 
     <varlistentry>
-     <term><option>-f</option> <replaceable>filenode</></term>
-     <listitem><para>show info for table with filenode <replaceable>filenode</></para></listitem>
+     <term><option>-i</option></term>
+     <listitem><para>include indexes and sequences in the listing</para></listitem>
     </varlistentry>
 
     <varlistentry>
-     <term><option>-t</option> <replaceable>tablename_pattern</></term>
-     <listitem><para>show info for table(s) matching <replaceable>tablename_pattern</></para></listitem>
+     <term><option>-o</option> <replaceable>oid</></term>
+     <listitem><para>show info for table with OID <replaceable>oid</></para></listitem>
+    </varlistentry>
+
+    <varlistentry>
+     <term><option>-q</option></term>
+     <listitem><para>omit headers (useful for scripting)</para></listitem>
     </varlistentry>
 
     <varlistentry>
@@ -88,8 +93,8 @@
     </varlistentry>
 
     <varlistentry>
-     <term><option>-i</option></term>
-     <listitem><para>include indexes and sequences in the listing</para></listitem>
+     <term><option>-t</option> <replaceable>tablename_pattern</></term>
+     <listitem><para>show info for table(s) matching <replaceable>tablename_pattern</></para></listitem>
     </varlistentry>
 
     <varlistentry>
@@ -98,12 +103,14 @@
       schema name, and OID
      </para></listitem>
     </varlistentry>
+   </variablelist>
+  </para>
 
-    <varlistentry>
-     <term><option>-q</option></term>
-     <listitem><para>omit headers (useful for scripting)</para></listitem>
-    </varlistentry>
+  <para>
+   <application>oid2name</application> also accepts the following command-line
+   arguments for connection parameters:
 
+   <variablelist>
     <varlistentry>
      <term><option>-d</option> <replaceable>database</></term>
      <listitem><para>database to connect to</para></listitem>
diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml
index 89f392eaeb0..b2e94e83d8e 100644
--- a/doc/src/sgml/ref/initdb.sgml
+++ b/doc/src/sgml/ref/initdb.sgml
@@ -230,6 +230,7 @@ PostgreSQL documentation
      </varlistentry>
 
      <varlistentry>
+      <term><option>-T <replaceable>CFG</></option></term>
       <term><option>--text-search-config=<replaceable>CFG</></option></term>
       <listitem>
        <para>
@@ -283,7 +284,7 @@ PostgreSQL documentation
    </para>
 
    <para>
-    Other, less commonly used, parameters are also available:
+    Other, less commonly used, options are also available:
 
     <variablelist>
      <varlistentry>
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index 7e343e671b6..76bfcf1cbb8 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -129,7 +129,7 @@ PostgreSQL documentation
         <literal>stdout</literal>.
        </para>
        <para>
-        This parameter is required.
+        This option is required.
        </para>
       </listitem>
      </varlistentry>
@@ -420,7 +420,7 @@ PostgreSQL documentation
    </para>
 
    <para>
-    Other, less commonly used, parameters are also available:
+    Other, less commonly used, options are also available:
 
     <variablelist>
      <varlistentry>
diff --git a/doc/src/sgml/ref/pg_controldata.sgml b/doc/src/sgml/ref/pg_controldata.sgml
index 7926acb9180..c9eebc089e6 100644
--- a/doc/src/sgml/ref/pg_controldata.sgml
+++ b/doc/src/sgml/ref/pg_controldata.sgml
@@ -42,9 +42,9 @@ PostgreSQL documentation
    it requires read access to the data directory.
    You can specify the data directory on the command line, or use
    the environment variable <envar>PGDATA</>.  This utility supports the options
-   <literal>-V</> and <literal>--version</>, which print the
+   <option>-V</> and <option>--version</>, which print the
    <application>pg_controldata</application> version and exit.  It also
-   supports options <literal>-?</> and <literal>--help</>, which output the
+   supports options <option>-?</> and <option>--help</>, which output the
    supported arguments.
   </para>
  </refsect1>
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 4f7f5109fb9..12ddd259662 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -413,22 +413,6 @@ PostgreSQL documentation
       </listitem>
      </varlistentry>
 
-     <varlistentry>
-       <term><option>--section=<replaceable class="parameter">sectionname</replaceable></option></term>
-       <listitem>
-         <para>
-           Only dump the named section. The name can be one of <option>pre-data</>, <option>data</>
-           and <option>post-data</>.
-           This option can be specified more than once. The default is to dump all sections.
-         </para>
-         <para>
-           Post-data items consist of definitions of indexes, triggers, rules
-           and constraints other than validated check constraints.
-           Pre-data items consist of all other data definition items.
-         </para>
-       </listitem>
-     </varlistentry>
-
      <varlistentry>
       <term><option>-S <replaceable class="parameter">username</replaceable></option></term>
       <term><option>--superuser=<replaceable class="parameter">username</replaceable></option></term>
@@ -734,6 +718,22 @@ PostgreSQL documentation
       </listitem>
      </varlistentry>
 
+     <varlistentry>
+       <term><option>--section=<replaceable class="parameter">sectionname</replaceable></option></term>
+       <listitem>
+         <para>
+           Only dump the named section. The name can be one of <option>pre-data</>, <option>data</>
+           and <option>post-data</>.
+           This option can be specified more than once. The default is to dump all sections.
+         </para>
+         <para>
+           Post-data items consist of definitions of indexes, triggers, rules
+           and constraints other than validated check constraints.
+           Pre-data items consist of all other data definition items.
+         </para>
+       </listitem>
+     </varlistentry>
+
      <varlistentry>
       <term><option>--serializable-deferrable</option></term>
       <listitem>
diff --git a/doc/src/sgml/ref/pg_receivexlog.sgml b/doc/src/sgml/ref/pg_receivexlog.sgml
index 07f64181c1f..8e5fca40228 100644
--- a/doc/src/sgml/ref/pg_receivexlog.sgml
+++ b/doc/src/sgml/ref/pg_receivexlog.sgml
@@ -192,7 +192,7 @@ PostgreSQL documentation
    </para>
 
    <para>
-    Other, less commonly used, parameters are also available:
+    Other, less commonly used, options are also available:
 
     <variablelist>
      <varlistentry>
diff --git a/doc/src/sgml/ref/pg_resetxlog.sgml b/doc/src/sgml/ref/pg_resetxlog.sgml
index fe67a3d1f20..e98ae404459 100644
--- a/doc/src/sgml/ref/pg_resetxlog.sgml
+++ b/doc/src/sgml/ref/pg_resetxlog.sgml
@@ -63,13 +63,13 @@ PostgreSQL documentation
   <para>
    If <command>pg_resetxlog</command> complains that it cannot determine
    valid data for <filename>pg_control</>, you can force it to proceed anyway
-   by specifying the <literal>-f</> (force) switch.  In this case plausible
+   by specifying the <option>-f</> (force) option.  In this case plausible
    values will be substituted for the missing data.  Most of the fields can be
    expected to match, but manual assistance might be needed for the next OID,
    next transaction ID and epoch, next multitransaction ID and offset, and
-   WAL starting address fields. These fields can be set using the switches
+   WAL starting address fields. These fields can be set using the options
    discussed below. If you are not able to determine correct values for all
-   these fields, <literal>-f</> can still be used, but
+   these fields, <option>-f</> can still be used, but
    the recovered database must be treated with even more suspicion than
    usual: an immediate dump and reload is imperative.  <emphasis>Do not</>
    execute any data-modifying operations in the database before you dump,
@@ -77,10 +77,10 @@ PostgreSQL documentation
   </para>
 
   <para>
-   The <literal>-o</>, <literal>-x</>, <literal>-e</>,
-   <literal>-m</>, <literal>-O</>,
-   and <literal>-l</>
-   switches allow the next OID, next transaction ID, next transaction ID's
+   The <option>-o</>, <option>-x</>, <option>-e</>,
+   <option>-m</>, <option>-O</>,
+   and <option>-l</>
+   options allow the next OID, next transaction ID, next transaction ID's
    epoch, next multitransaction ID, next multitransaction offset, and WAL
    starting address values to be set manually.  These are only needed when
    <command>pg_resetxlog</command> is unable to determine appropriate values
@@ -90,12 +90,12 @@ PostgreSQL documentation
    <itemizedlist>
     <listitem>
      <para>
-      A safe value for the next transaction ID (<literal>-x</>)
+      A safe value for the next transaction ID (<option>-x</>)
       can be determined by looking for the numerically largest
       file name in the directory <filename>pg_clog</> under the data directory,
       adding one,
       and then multiplying by 1048576.  Note that the file names are in
-      hexadecimal.  It is usually easiest to specify the switch value in
+      hexadecimal.  It is usually easiest to specify the option value in
       hexadecimal too. For example, if <filename>0011</> is the largest entry
       in <filename>pg_clog</>, <literal>-x 0x1200000</> will work (five
       trailing zeroes provide the proper multiplier).
@@ -104,29 +104,29 @@ PostgreSQL documentation
 
     <listitem>
      <para>
-      A safe value for the next multitransaction ID (<literal>-m</>)
+      A safe value for the next multitransaction ID (<option>-m</>)
       can be determined by looking for the numerically largest
       file name in the directory <filename>pg_multixact/offsets</> under the
       data directory, adding one, and then multiplying by 65536.  As above,
       the file names are in hexadecimal, so the easiest way to do this is to
-      specify the switch value in hexadecimal and add four zeroes.
+      specify the option value in hexadecimal and add four zeroes.
      </para>
     </listitem>
 
     <listitem>
      <para>
-      A safe value for the next multitransaction offset (<literal>-O</>)
+      A safe value for the next multitransaction offset (<option>-O</>)
       can be determined by looking for the numerically largest
       file name in the directory <filename>pg_multixact/members</> under the
       data directory, adding one, and then multiplying by 65536.  As above,
       the file names are in hexadecimal, so the easiest way to do this is to
-      specify the switch value in hexadecimal and add four zeroes.
+      specify the option value in hexadecimal and add four zeroes.
      </para>
     </listitem>
 
     <listitem>
      <para>
-      The WAL starting address (<literal>-l</>) should be
+      The WAL starting address (<option>-l</>) should be
       larger than any WAL segment file name currently existing in
       the directory <filename>pg_xlog</> under the data directory.
       These names are also in hexadecimal and have three parts.  The first
@@ -143,9 +143,9 @@ PostgreSQL documentation
      <note>
       <para>
        <command>pg_resetxlog</command> itself looks at the files in
-       <filename>pg_xlog</> and chooses a default <literal>-l</> setting
+       <filename>pg_xlog</> and chooses a default <option>-l</> setting
        beyond the last existing file name.  Therefore, manual adjustment of
-       <literal>-l</> should only be needed if you are aware of WAL segment
+       <option>-l</> should only be needed if you are aware of WAL segment
        files that are not currently present in <filename>pg_xlog</>, such as
        entries in an offline archive; or if the contents of
        <filename>pg_xlog</> have been lost entirely.
@@ -176,7 +176,7 @@ PostgreSQL documentation
   </para>
 
   <para>
-   The <literal>-n</> (no operation) switch instructs
+   The <option>-n</> (no operation) option instructs
    <command>pg_resetxlog</command> to print the values reconstructed from
    <filename>pg_control</> and then exit without modifying anything.
    This is mainly a debugging tool, but can be useful as a sanity check
@@ -184,9 +184,9 @@ PostgreSQL documentation
   </para>
 
   <para>
-   The <literal>-V</> and <literal>--version</> options print
+   The <option>-V</> and <option>--version</> options print
    the <application>pg_resetxlog</application> version and exit.  The
-   options <literal>-?</> and <literal>--help</> show supported arguments,
+   options <option>-?</> and <option>--help</> show supported arguments,
    and exit.
   </para>
 
-- 
GitLab