Thread: "--version" flag missing from man pages

"--version" flag missing from man pages

From
Josh Kupershmidt
Date:
I noticed that the "--version" flag is not in the man pages for pg_dump, pg_dumpall, initdb, and various other commands. Out of all the files in ./doc/src/sgml/ref/ , I can see only these three which have "--version" listed:

  josh@hades:~/src/postgresql/doc/src/sgml/ref$ grep "\-\-version" *.sgml
  ecpg-ref.sgml:     <term><option>--version</option></term>
  pg_config-ref.sgml:     <term><option>--version</option></>
  psql-ref.sgml:      <term><option>--version</></term>

Yet many other commands support a -V or --version flag which isn't in their man pages.

  $ initdb --version
  initdb (PostgreSQL) 8.5devel

Josh

Re: "--version" flag missing from man pages

From
Bruce Momjian
Date:
Josh Kupershmidt wrote:
> I noticed that the "--version" flag is not in the man pages for pg_dump,
> pg_dumpall, initdb, and various other commands. Out of all the files in
> ./doc/src/sgml/ref/ , I can see only these three which have "--version"
> listed:
>
>   josh@hades:~/src/postgresql/doc/src/sgml/ref$ grep "\-\-version" *.sgml
>   ecpg-ref.sgml:     <term><option>--version</option></term>
>   pg_config-ref.sgml:     <term><option>--version</option></>
>   psql-ref.sgml:      <term><option>--version</></term>
>
> Yet many other commands support a -V or --version flag which isn't in their
> man pages.
>
>   $ initdb --version
>   initdb (PostgreSQL) 8.5devel

Interesting, I never noticed they were not documented.  I have applied
the attached patch which adds documentation for those options.  These
new documentation changes will appear in Postgres 9.0

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/ref/clusterdb.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/clusterdb.sgml,v
retrieving revision 1.26
diff -c -c -r1.26 clusterdb.sgml
*** doc/src/sgml/ref/clusterdb.sgml    19 Feb 2010 03:50:03 -0000    1.26
--- doc/src/sgml/ref/clusterdb.sgml    19 Feb 2010 14:35:18 -0000
***************
*** 129,134 ****
--- 129,155 ----
        </listitem>
       </varlistentry>

+     <varlistentry>
+       <term><option>-V</></term>
+       <term><option>--version</></term>
+       <listitem>
+       <para>
+       Print the <application>clusterdb</application> version and exit.
+       </para>
+       </listitem>
+     </varlistentry>
+
+     <varlistentry>
+       <term><option>-?</></term>
+       <term><option>--help</></term>
+       <listitem>
+       <para>
+       Show help about <application>clusterdb</application> command line
+       arguments, and exit.
+       </para>
+       </listitem>
+     </varlistentry>
+
      </variablelist>
     </para>

Index: doc/src/sgml/ref/createdb.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v
retrieving revision 1.50
diff -c -c -r1.50 createdb.sgml
*** doc/src/sgml/ref/createdb.sgml    19 Feb 2010 03:50:03 -0000    1.50
--- doc/src/sgml/ref/createdb.sgml    19 Feb 2010 14:35:18 -0000
***************
*** 168,173 ****
--- 168,195 ----
         </para>
        </listitem>
       </varlistentry>
+
+      <varlistentry>
+        <term><option>-V</></term>
+        <term><option>--version</></term>
+        <listitem>
+        <para>
+        Print the <application>createdb</application> version and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
+     <varlistentry>
+       <term><option>-?</></term>
+       <term><option>--help</></term>
+       <listitem>
+       <para>
+       Show help about <application>createdb</application> command line
+       arguments, and exit.
+       </para>
+       </listitem>
+     </varlistentry>
+
      </variablelist>
     </para>

Index: doc/src/sgml/ref/createlang.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v
retrieving revision 1.44
diff -c -c -r1.44 createlang.sgml
*** doc/src/sgml/ref/createlang.sgml    19 Feb 2010 03:50:03 -0000    1.44
--- doc/src/sgml/ref/createlang.sgml    19 Feb 2010 14:35:18 -0000
***************
*** 96,101 ****
--- 96,122 ----
        </listitem>
       </varlistentry>

+      <varlistentry>
+        <term><option>-V</></term>
+        <term><option>--version</></term>
+        <listitem>
+        <para>
+        Print the <application>createlang</application> version and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
+     <varlistentry>
+       <term><option>-?</></term>
+       <term><option>--help</></term>
+       <listitem>
+       <para>
+       Show help about <application>createlang</application> command line
+       arguments, and exit.
+       </para>
+       </listitem>
+     </varlistentry>
+
      </variablelist>
     </para>

Index: doc/src/sgml/ref/createuser.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v
retrieving revision 1.53
diff -c -c -r1.53 createuser.sgml
*** doc/src/sgml/ref/createuser.sgml    19 Feb 2010 03:50:03 -0000    1.53
--- doc/src/sgml/ref/createuser.sgml    19 Feb 2010 14:35:18 -0000
***************
*** 243,248 ****
--- 243,270 ----
         </para>
        </listitem>
       </varlistentry>
+
+      <varlistentry>
+        <term><option>-V</></term>
+        <term><option>--version</></term>
+        <listitem>
+        <para>
+        Print the <application>createuser</application> version and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-?</></term>
+        <term><option>--help</></term>
+        <listitem>
+        <para>
+        Show help about <application>createuser</application> command line
+        arguments, and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
      </variablelist>
    </para>

Index: doc/src/sgml/ref/dropdb.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v
retrieving revision 1.36
diff -c -c -r1.36 dropdb.sgml
*** doc/src/sgml/ref/dropdb.sgml    19 Feb 2010 03:50:03 -0000    1.36
--- doc/src/sgml/ref/dropdb.sgml    19 Feb 2010 14:35:18 -0000
***************
*** 86,92 ****
--- 86,115 ----
         </para>
        </listitem>
       </varlistentry>
+
+      <varlistentry>
+        <term><option>-V</></term>
+        <term><option>--version</></term>
+        <listitem>
+        <para>
+        Print the <application>dropdb</application> version and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-?</></term>
+        <term><option>--help</></term>
+        <listitem>
+        <para>
+        Show help about <application>dropdb</application> command line
+        arguments, and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
      </variablelist>
+
    </para>

    <para>
Index: doc/src/sgml/ref/droplang.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v
retrieving revision 1.32
diff -c -c -r1.32 droplang.sgml
*** doc/src/sgml/ref/droplang.sgml    26 Feb 2009 16:02:37 -0000    1.32
--- doc/src/sgml/ref/droplang.sgml    19 Feb 2010 14:35:18 -0000
***************
*** 104,109 ****
--- 104,130 ----
        </listitem>
       </varlistentry>

+      <varlistentry>
+        <term><option>-V</></term>
+        <term><option>--version</></term>
+        <listitem>
+        <para>
+        Print the <application>droplang</application> version and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-?</></term>
+        <term><option>--help</></term>
+        <listitem>
+        <para>
+        Show help about <application>droplang</application> command line
+        arguments, and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
      </variablelist>
     </para>

Index: doc/src/sgml/ref/dropuser.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v
retrieving revision 1.41
diff -c -c -r1.41 dropuser.sgml
*** doc/src/sgml/ref/dropuser.sgml    19 Feb 2010 03:50:03 -0000    1.41
--- doc/src/sgml/ref/dropuser.sgml    19 Feb 2010 14:35:18 -0000
***************
*** 88,93 ****
--- 88,115 ----
         </para>
        </listitem>
       </varlistentry>
+
+      <varlistentry>
+        <term><option>-V</></term>
+        <term><option>--version</></term>
+        <listitem>
+        <para>
+        Print the <application>dropuser</application> version and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-?</></term>
+        <term><option>--help</></term>
+        <listitem>
+        <para>
+        Show help about <application>dropuser</application> command line
+        arguments, and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
      </variablelist>
    </para>

Index: doc/src/sgml/ref/ecpg-ref.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/ecpg-ref.sgml,v
retrieving revision 1.33
diff -c -c -r1.33 ecpg-ref.sgml
*** doc/src/sgml/ref/ecpg-ref.sgml    19 Feb 2010 03:50:03 -0000    1.33
--- doc/src/sgml/ref/ecpg-ref.sgml    19 Feb 2010 14:35:18 -0000
***************
*** 159,186 ****
       <listitem>
        <para>
         Print additional information including the version and the
!        include path.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
!      <term><option>--help</option></term>
       <listitem>
        <para>
!        Show a brief summary of the command usage, then exit.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
!      <term><option>--version</option></term>
       <listitem>
        <para>
!        Output version information, then exit.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </para>
   </refsect1>
--- 159,188 ----
       <listitem>
        <para>
         Print additional information including the version and the
!        "include" path.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
!      <term><option>--version</option></term>
       <listitem>
        <para>
!        Print the <application>ecpg</application> version and exit.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
!      <term><option>--help</option></term>
       <listitem>
        <para>
!        Show help about <application>ecpg</application> command line
!        arguments, and exit.
        </para>
       </listitem>
      </varlistentry>
+
     </variablelist>
    </para>
   </refsect1>
Index: doc/src/sgml/ref/initdb.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v
retrieving revision 1.45
diff -c -c -r1.45 initdb.sgml
*** doc/src/sgml/ref/initdb.sgml    10 Dec 2009 06:32:28 -0000    1.45
--- doc/src/sgml/ref/initdb.sgml    19 Feb 2010 14:35:18 -0000
***************
*** 280,285 ****
--- 280,307 ----
         </para>
        </listitem>
       </varlistentry>
+
+      <varlistentry>
+        <term><option>-V</></term>
+        <term><option>--version</></term>
+        <listitem>
+        <para>
+        Print the <application>initdb</application> version and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-?</></term>
+        <term><option>--help</></term>
+        <listitem>
+        <para>
+        Show help about <application>initdb</application> command line
+        arguments, and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
      </variablelist>
     </para>

Index: doc/src/sgml/ref/pg_controldata.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/pg_controldata.sgml,v
retrieving revision 1.11
diff -c -c -r1.11 pg_controldata.sgml
*** doc/src/sgml/ref/pg_controldata.sgml    23 Sep 2008 09:20:35 -0000    1.11
--- doc/src/sgml/ref/pg_controldata.sgml    19 Feb 2010 14:35:18 -0000
***************
*** 40,46 ****
     This utility can only be run by the user who initialized the cluster because
     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</>.
    </para>
   </refsect1>

--- 40,50 ----
     This utility can only be run by the user who initialized the cluster because
     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
!    <application>pg_controldata</application> version and exit.  It also
!    supports options <literal>-?</> and <literal>--help</>, which output the
!    supported arguments.
    </para>
   </refsect1>

Index: doc/src/sgml/ref/pg_dump.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v
retrieving revision 1.115
diff -c -c -r1.115 pg_dump.sgml
*** doc/src/sgml/ref/pg_dump.sgml    19 Feb 2010 03:50:03 -0000    1.115
--- doc/src/sgml/ref/pg_dump.sgml    19 Feb 2010 14:35:18 -0000
***************
*** 484,489 ****
--- 484,499 ----
       </varlistentry>

       <varlistentry>
+        <term><option>-V</></term>
+        <term><option>--version</></term>
+        <listitem>
+        <para>
+        Print the <application>pg_dump</application> version and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
        <term><option>-x</></term>
        <term><option>--no-privileges</></term>
        <term><option>--no-acl</></term>
***************
*** 645,650 ****
--- 655,672 ----
         </para>
        </listitem>
       </varlistentry>
+
+      <varlistentry>
+        <term><option>-?</></term>
+        <term><option>--help</></term>
+        <listitem>
+        <para>
+        Show help about <application>pg_dump</application> command line
+        arguments, and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
      </variablelist>
     </para>

Index: doc/src/sgml/ref/pg_dumpall.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v
retrieving revision 1.80
diff -c -c -r1.80 pg_dumpall.sgml
*** doc/src/sgml/ref/pg_dumpall.sgml    19 Feb 2010 03:50:03 -0000    1.80
--- doc/src/sgml/ref/pg_dumpall.sgml    19 Feb 2010 14:35:18 -0000
***************
*** 249,254 ****
--- 249,264 ----
       </varlistentry>

       <varlistentry>
+        <term><option>-V</></term>
+        <term><option>--version</></term>
+        <listitem>
+        <para>
+        Print the <application>pg_dumpall</application> version and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
        <term><option>-x</></term>
        <term><option>--no-privileges</></term>
        <term><option>--no-acl</></term>
***************
*** 346,351 ****
--- 356,372 ----
        </listitem>
       </varlistentry>

+      <varlistentry>
+        <term><option>-?</></term>
+        <term><option>--help</></term>
+        <listitem>
+        <para>
+        Show help about <application>pg_dumpall</application> command line
+        arguments, and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
      </variablelist>
     </para>

Index: doc/src/sgml/ref/pg_resetxlog.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/pg_resetxlog.sgml,v
retrieving revision 1.21
diff -c -c -r1.21 pg_resetxlog.sgml
*** doc/src/sgml/ref/pg_resetxlog.sgml    23 Sep 2008 09:20:35 -0000    1.21
--- doc/src/sgml/ref/pg_resetxlog.sgml    19 Feb 2010 14:35:18 -0000
***************
*** 178,183 ****
--- 178,191 ----
     This is mainly a debugging tool, but can be useful as a sanity check
     before allowing <command>pg_resetxlog</command> to proceed for real.
    </para>
+
+   <para>
+    The <literal>-V</> and <literal>--version</> options print
+    the <application>pg_resetxlog</application> version and exit.  The
+    options <literal>-?</> and <literal>--help</> show supported arguments,
+    and exit.
+   </para>
+
   </refsect1>

   <refsect1>
Index: doc/src/sgml/ref/pg_restore.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v
retrieving revision 1.83
diff -c -c -r1.83 pg_restore.sgml
*** doc/src/sgml/ref/pg_restore.sgml    19 Feb 2010 03:50:03 -0000    1.83
--- doc/src/sgml/ref/pg_restore.sgml    19 Feb 2010 14:35:18 -0000
***************
*** 403,408 ****
--- 403,418 ----
       </varlistentry>

       <varlistentry>
+        <term><option>-V</></term>
+        <term><option>--version</></term>
+        <listitem>
+        <para>
+        Print the <application>pg_restore</application> version and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
        <term><option>-x</option></term>
        <term><option>--no-privileges</option></term>
        <term><option>--no-acl</option></term>
***************
*** 484,489 ****
--- 494,510 ----
        </listitem>
       </varlistentry>

+      <varlistentry>
+        <term><option>-?</></term>
+        <term><option>--help</></term>
+        <listitem>
+        <para>
+        Show help about <application>pg_restore</application> command line
+        arguments, and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
      </variablelist>
     </para>

Index: doc/src/sgml/ref/psql-ref.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.238
diff -c -c -r1.238 psql-ref.sgml
*** doc/src/sgml/ref/psql-ref.sgml    19 Feb 2010 03:50:03 -0000    1.238
--- doc/src/sgml/ref/psql-ref.sgml    19 Feb 2010 14:35:22 -0000
***************
*** 514,519 ****
--- 514,520 ----
        </para>
        </listitem>
      </varlistentry>
+
    </variablelist>
   </refsect1>

Index: doc/src/sgml/ref/reindexdb.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/reindexdb.sgml,v
retrieving revision 1.8
diff -c -c -r1.8 reindexdb.sgml
*** doc/src/sgml/ref/reindexdb.sgml    26 Feb 2009 16:02:37 -0000    1.8
--- doc/src/sgml/ref/reindexdb.sgml    19 Feb 2010 14:35:22 -0000
***************
*** 139,145 ****
         </para>
        </listitem>
       </varlistentry>
!     </variablelist>
     </para>

     <para>
--- 139,168 ----
         </para>
        </listitem>
       </varlistentry>
!
!     <varlistentry>
!       <term><option>-V</></term>
!       <term><option>--version</></term>
!       <listitem>
!        <para>
!        Print the <application>reindexdb</application> version and exit.
!        </para>
!       </listitem>
!     </varlistentry>
!
!     <varlistentry>
!       <term><option>-?</></term>
!       <term><option>--help</></term>
!       <listitem>
!       <para>
!       Show help about <application>reindexdb</application> command line
!       arguments, and exit.
!       </para>
!       </listitem>
!     </varlistentry>
!
!    </variablelist>
!
     </para>

     <para>
Index: doc/src/sgml/ref/vacuumdb.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v
retrieving revision 1.51
diff -c -c -r1.51 vacuumdb.sgml
*** doc/src/sgml/ref/vacuumdb.sgml    19 Feb 2010 03:50:03 -0000    1.51
--- doc/src/sgml/ref/vacuumdb.sgml    19 Feb 2010 14:35:22 -0000
***************
*** 176,181 ****
--- 176,191 ----
       </varlistentry>

       <varlistentry>
+        <term><option>-V</></term>
+        <term><option>--version</></term>
+        <listitem>
+        <para>
+        Print the <application>vacuumdb</application> version and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
        <term><option>-z</option></term>
        <term><option>--analyze</option></term>
        <listitem>
***************
*** 185,190 ****
--- 195,211 ----
        </listitem>
       </varlistentry>

+      <varlistentry>
+        <term><option>-?</></term>
+        <term><option>--help</></term>
+        <listitem>
+        <para>
+        Show help about <application>vacuumdb</application> command line
+        arguments, and exit.
+        </para>
+        </listitem>
+      </varlistentry>
+
      </variablelist>
     </para>