aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/oid2name/oid2name.c28
-rw-r--r--contrib/pg_archivecleanup/pg_archivecleanup.c10
-rw-r--r--contrib/pg_standby/pg_standby.c4
-rw-r--r--contrib/pg_upgrade/option.c2
-rw-r--r--contrib/pgbench/pgbench.c12
-rw-r--r--contrib/vacuumlo/vacuumlo.c21
-rw-r--r--doc/src/sgml/oid2name.sgml21
-rw-r--r--doc/src/sgml/pgarchivecleanup.sgml20
-rw-r--r--doc/src/sgml/pgbench.sgml20
-rw-r--r--doc/src/sgml/pgstandby.sgml20
-rw-r--r--doc/src/sgml/pgtestfsync.sgml20
-rw-r--r--doc/src/sgml/pgtesttiming.sgml21
-rw-r--r--doc/src/sgml/ref/createuser.sgml30
-rw-r--r--doc/src/sgml/ref/dropdb.sgml20
-rw-r--r--doc/src/sgml/ref/dropuser.sgml20
-rw-r--r--doc/src/sgml/ref/ecpg-ref.sgml1
-rw-r--r--doc/src/sgml/ref/initdb.sgml6
-rw-r--r--doc/src/sgml/ref/pg_basebackup.sgml2
-rw-r--r--doc/src/sgml/ref/pg_config-ref.sgml11
-rw-r--r--doc/src/sgml/ref/pg_ctl-ref.sgml21
-rw-r--r--doc/src/sgml/ref/pg_receivexlog.sgml2
-rw-r--r--doc/src/sgml/ref/postgres-ref.sgml21
-rw-r--r--doc/src/sgml/vacuumlo.sgml58
-rw-r--r--src/backend/main/main.c4
-rw-r--r--src/bin/initdb/initdb.c2
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c4
-rw-r--r--src/bin/pg_basebackup/pg_receivexlog.c2
-rw-r--r--src/bin/pg_config/pg_config.c2
-rw-r--r--src/bin/pg_controldata/pg_controldata.c16
-rw-r--r--src/bin/pg_ctl/pg_ctl.c4
-rw-r--r--src/bin/pg_dump/pg_dump.c4
-rw-r--r--src/bin/pg_dump/pg_dumpall.c4
-rw-r--r--src/bin/pg_dump/pg_restore.c4
-rw-r--r--src/bin/pg_resetxlog/pg_resetxlog.c4
-rw-r--r--src/bin/psql/help.c4
-rw-r--r--src/bin/scripts/clusterdb.c4
-rw-r--r--src/bin/scripts/createdb.c4
-rw-r--r--src/bin/scripts/createlang.c4
-rw-r--r--src/bin/scripts/createuser.c4
-rw-r--r--src/bin/scripts/dropdb.c4
-rw-r--r--src/bin/scripts/droplang.c4
-rw-r--r--src/bin/scripts/dropuser.c4
-rw-r--r--src/bin/scripts/reindexdb.c4
-rw-r--r--src/bin/scripts/vacuumdb.c4
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.c2
45 files changed, 346 insertions, 137 deletions
diff --git a/contrib/oid2name/oid2name.c b/contrib/oid2name/oid2name.c
index c7ba1bd1010..e8a389e49e7 100644
--- a/contrib/oid2name/oid2name.c
+++ b/contrib/oid2name/oid2name.c
@@ -179,20 +179,20 @@ help(const char *progname)
"Usage:\n"
" %s [OPTION]...\n"
"\nOptions:\n"
- " -d DBNAME database to connect to\n"
- " -f FILENODE show info for table with given file node\n"
- " -H HOSTNAME database server host or socket directory\n"
- " -i show indexes and sequences too\n"
- " -o OID show info for table with given OID\n"
- " -p PORT database server port number\n"
- " -q quiet (don't show headers)\n"
- " -s show all tablespaces\n"
- " -S show system objects too\n"
- " -t TABLE show info for named table\n"
- " -U NAME connect as specified database user\n"
- " -x extended (show additional columns)\n"
- " --help show this help, then exit\n"
- " --version output version information, then exit\n"
+ " -d DBNAME database to connect to\n"
+ " -f FILENODE show info for table with given file node\n"
+ " -H HOSTNAME database server host or socket directory\n"
+ " -i show indexes and sequences too\n"
+ " -o OID show info for table with given OID\n"
+ " -p PORT database server port number\n"
+ " -q quiet (don't show headers)\n"
+ " -s show all tablespaces\n"
+ " -S show system objects too\n"
+ " -t TABLE show info for named table\n"
+ " -U NAME connect as specified database user\n"
+ " -V, --version output version information, then exit\n"
+ " -x extended (show additional columns)\n"
+ " -?, --help show this help, then exit\n"
"\nThe default action is to show all database OIDs.\n\n"
"Report bugs to <pgsql-bugs@postgresql.org>.\n",
progname, progname);
diff --git a/contrib/pg_archivecleanup/pg_archivecleanup.c b/contrib/pg_archivecleanup/pg_archivecleanup.c
index a226101bbc4..8f77998de12 100644
--- a/contrib/pg_archivecleanup/pg_archivecleanup.c
+++ b/contrib/pg_archivecleanup/pg_archivecleanup.c
@@ -249,11 +249,11 @@ usage(void)
printf("Usage:\n");
printf(" %s [OPTION]... ARCHIVELOCATION OLDESTKEPTWALFILE\n", progname);
printf("\nOptions:\n");
- printf(" -d generate debug output (verbose mode)\n");
- printf(" -n dry run, show the names of the files that would be removed\n");
- printf(" -x EXT clean up files if they have this extension\n");
- printf(" --help show this help, then exit\n");
- printf(" --version output version information, then exit\n");
+ printf(" -d generate debug output (verbose mode)\n");
+ printf(" -n dry run, show the names of the files that would be removed\n");
+ printf(" -V, --version output version information, then exit\n");
+ printf(" -x EXT clean up files if they have this extension\n");
+ printf(" -?, --help show this help, then exit\n");
printf("\n"
"For use as archive_cleanup_command in recovery.conf when standby_mode = on:\n"
" archive_cleanup_command = 'pg_archivecleanup [OPTION]... ARCHIVELOCATION %%r'\n"
diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c
index 57241ff8970..84941ede137 100644
--- a/contrib/pg_standby/pg_standby.c
+++ b/contrib/pg_standby/pg_standby.c
@@ -527,9 +527,9 @@ usage(void)
printf(" -s SLEEPTIME seconds to wait between file checks (min=1, max=60,\n"
" default=5)\n");
printf(" -t TRIGGERFILE trigger file to initiate failover (no default)\n");
+ printf(" -V, --version output version information, then exit\n");
printf(" -w MAXWAITTIME max seconds to wait for a file (0=no limit) (default=0)\n");
- printf(" --help show this help, then exit\n");
- printf(" --version output version information, then exit\n");
+ printf(" -?, --help show this help, then exit\n");
printf("\n"
"Main intended use as restore_command in recovery.conf:\n"
" restore_command = 'pg_standby [OPTION]... ARCHIVELOCATION %%f %%p %%r'\n"
diff --git a/contrib/pg_upgrade/option.c b/contrib/pg_upgrade/option.c
index ccf00434d3b..43394a0fb4a 100644
--- a/contrib/pg_upgrade/option.c
+++ b/contrib/pg_upgrade/option.c
@@ -236,7 +236,7 @@ Options:\n\
-u, --user=NAME cluster superuser (default \"%s\")\n\
-v, --verbose enable verbose internal logging\n\
-V, --version display version information, then exit\n\
- -h, --help show this help, then exit\n\
+ -?, -h, --help show this help, then exit\n\
\n\
Before running pg_upgrade you must:\n\
create a new database cluster (using the new version of initdb)\n\
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index 25fb15a8471..f2fdc6c56f6 100644
--- a/contrib/pgbench/pgbench.c
+++ b/contrib/pgbench/pgbench.c
@@ -368,12 +368,12 @@ usage(const char *progname)
" -T NUM duration of benchmark test in seconds\n"
" -v vacuum all four standard tables before tests\n"
"\nCommon options:\n"
- " -d print debugging output\n"
- " -h HOSTNAME database server host or socket directory\n"
- " -p PORT database server port number\n"
- " -U USERNAME connect as specified database user\n"
- " --help show this help, then exit\n"
- " --version output version information, then exit\n"
+ " -d print debugging output\n"
+ " -h HOSTNAME database server host or socket directory\n"
+ " -p PORT database server port number\n"
+ " -U USERNAME connect as specified database user\n"
+ " -V, --version output version information, then exit\n"
+ " -?, --help show this help, then exit\n"
"\n"
"Report bugs to <pgsql-bugs@postgresql.org>.\n",
progname, progname);
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 958a496b24a..7f5287c27ae 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -384,16 +384,17 @@ usage(const char *progname)
printf("%s removes unreferenced large objects from databases.\n\n", progname);
printf("Usage:\n %s [OPTION]... DBNAME...\n\n", progname);
printf("Options:\n");
- printf(" -h HOSTNAME database server host or socket directory\n");
- printf(" -l LIMIT commit after removing each LIMIT large objects\n");
- printf(" -n don't remove large objects, just show what would be done\n");
- printf(" -p PORT database server port\n");
- printf(" -U USERNAME user name to connect as\n");
- printf(" -w never prompt for password\n");
- printf(" -W force password prompt\n");
- printf(" -v write a lot of progress messages\n");
- printf(" --help show this help, then exit\n");
- printf(" --version output version information, then exit\n");
+ printf(" -l LIMIT commit after removing each LIMIT large objects\n");
+ printf(" -n don't remove large objects, just show what would be done\n");
+ printf(" -v write a lot of progress messages\n");
+ printf(" -V, --version output version information, then exit\n");
+ printf(" -?, --help show this help, then exit\n");
+ printf("\nConnection options:\n");
+ printf(" -h HOSTNAME database server host or socket directory\n");
+ printf(" -p PORT database server port\n");
+ printf(" -U USERNAME user name to connect as\n");
+ printf(" -w never prompt for password\n");
+ printf(" -W force password prompt\n");
printf("\n");
printf("Report bugs to <pgsql-bugs@postgresql.org>.\n");
}
diff --git a/doc/src/sgml/oid2name.sgml b/doc/src/sgml/oid2name.sgml
index 30e8bb1972c..5e39677496b 100644
--- a/doc/src/sgml/oid2name.sgml
+++ b/doc/src/sgml/oid2name.sgml
@@ -98,11 +98,32 @@
</varlistentry>
<varlistentry>
+ <term><option>-V</></term>
+ <term><option>--version</></term>
+ <listitem>
+ <para>
+ Print the <application>oid2name</application> version and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-x</option></term>
<listitem><para>display more information about each object shown: tablespace name,
schema name, and OID
</para></listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>-?</></term>
+ <term><option>--help</></term>
+ <listitem>
+ <para>
+ Show help about <application>oid2name</application> command line
+ arguments, and exit.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
diff --git a/doc/src/sgml/pgarchivecleanup.sgml b/doc/src/sgml/pgarchivecleanup.sgml
index 44e8bbdfc24..932914bc2f8 100644
--- a/doc/src/sgml/pgarchivecleanup.sgml
+++ b/doc/src/sgml/pgarchivecleanup.sgml
@@ -107,6 +107,16 @@ pg_archivecleanup: removing file "archive/00000001000000370000000E"
</varlistentry>
<varlistentry>
+ <term><option>-V</></term>
+ <term><option>--version</></term>
+ <listitem>
+ <para>
+ Print the <application>pg_archivecleanup</application> version and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-x</option> <replaceable>extension</></term>
<listitem>
<para>
@@ -126,6 +136,16 @@ pg_archivecleanup: removing file "archive/00000001000000370000000E"
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>-?</></term>
+ <term><option>--help</></term>
+ <listitem>
+ <para>
+ Show help about <application>pg_archivecleanup</application> command line
+ arguments, and exit.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
</refsect1>
diff --git a/doc/src/sgml/pgbench.sgml b/doc/src/sgml/pgbench.sgml
index 1b0905fa271..4a80b46416d 100644
--- a/doc/src/sgml/pgbench.sgml
+++ b/doc/src/sgml/pgbench.sgml
@@ -453,6 +453,26 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>-V</></term>
+ <term><option>--version</></term>
+ <listitem>
+ <para>
+ Print the <application>pgbench</application> version and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-?</></term>
+ <term><option>--help</></term>
+ <listitem>
+ <para>
+ Show help about <application>pgbench</application> command line
+ arguments, and exit.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
diff --git a/doc/src/sgml/pgstandby.sgml b/doc/src/sgml/pgstandby.sgml
index 0fe3f646bc0..ca2b5c078dc 100644
--- a/doc/src/sgml/pgstandby.sgml
+++ b/doc/src/sgml/pgstandby.sgml
@@ -199,6 +199,16 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r'
</varlistentry>
<varlistentry>
+ <term><option>-V</></term>
+ <term><option>--version</></term>
+ <listitem>
+ <para>
+ Print the <application>pg_standby</application> version and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-w</option> <replaceable>maxwaittime</></term>
<listitem>
<para>
@@ -211,6 +221,16 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r'
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>-?</></term>
+ <term><option>--help</></term>
+ <listitem>
+ <para>
+ Show help about <application>pg_standby</application> command line
+ arguments, and exit.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
diff --git a/doc/src/sgml/pgtestfsync.sgml b/doc/src/sgml/pgtestfsync.sgml
index d8c0c458088..95ba3b81e0c 100644
--- a/doc/src/sgml/pgtestfsync.sgml
+++ b/doc/src/sgml/pgtestfsync.sgml
@@ -75,6 +75,26 @@
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>-V</></term>
+ <term><option>--version</></term>
+ <listitem>
+ <para>
+ Print the <application>pg_test_fsync</application> version and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-?</></term>
+ <term><option>--help</></term>
+ <listitem>
+ <para>
+ Show help about <application>pg_test_fsync</application> command line
+ arguments, and exit.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
diff --git a/doc/src/sgml/pgtesttiming.sgml b/doc/src/sgml/pgtesttiming.sgml
index 486be831237..f74d63e6883 100644
--- a/doc/src/sgml/pgtesttiming.sgml
+++ b/doc/src/sgml/pgtesttiming.sgml
@@ -56,6 +56,27 @@
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>-V</></term>
+ <term><option>--version</></term>
+ <listitem>
+ <para>
+ Print the <application>pg_test_timing</application> version and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-?</></term>
+ <term><option>--help</></term>
+ <listitem>
+ <para>
+ Show help about <application>pg_test_timing</application> command line
+ arguments, and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</para>
diff --git a/doc/src/sgml/ref/createuser.sgml b/doc/src/sgml/ref/createuser.sgml
index dedc97f2233..2f1ea2fb73b 100644
--- a/doc/src/sgml/ref/createuser.sgml
+++ b/doc/src/sgml/ref/createuser.sgml
@@ -257,35 +257,35 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
- <term><option>--replication</></term>
- <listitem>
+ <term><option>-V</></term>
+ <term><option>--version</></term>
+ <listitem>
<para>
- The new user will have the REPLICATION privilege, which is
- described more fully in the documentation for
- <xref linkend="sql-createrole">.
+ Print the <application>createuser</application> version and exit.
</para>
- </listitem>
+ </listitem>
</varlistentry>
<varlistentry>
- <term><option>--no-replication</></term>
+ <term><option>--replication</></term>
<listitem>
<para>
- The new user will not have the REPLICATION privilege, which is
- described more fully in the documentation for
- <xref linkend="sql-createrole">.
+ The new user will have the <literal>REPLICATION</literal> privilege,
+ which is described more fully in the documentation for <xref
+ linkend="sql-createrole">.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-V</></term>
- <term><option>--version</></term>
- <listitem>
+ <term><option>--no-replication</></term>
+ <listitem>
<para>
- Print the <application>createuser</application> version and exit.
+ The new user will not have the <literal>REPLICATION</literal>
+ privilege, which is described more fully in the documentation for <xref
+ linkend="sql-createrole">.
</para>
- </listitem>
+ </listitem>
</varlistentry>
<varlistentry>
diff --git a/doc/src/sgml/ref/dropdb.sgml b/doc/src/sgml/ref/dropdb.sgml
index ba781cce52b..4593604f3bc 100644
--- a/doc/src/sgml/ref/dropdb.sgml
+++ b/doc/src/sgml/ref/dropdb.sgml
@@ -87,16 +87,6 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
- <term><option>--if-exists</></term>
- <listitem>
- <para>
- Do not throw an error if the database does not exist. A notice is issued
- in this case.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term><option>-V</></term>
<term><option>--version</></term>
<listitem>
@@ -107,6 +97,16 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>--if-exists</></term>
+ <listitem>
+ <para>
+ Do not throw an error if the database does not exist. A notice is issued
+ in this case.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-?</></term>
<term><option>--help</></term>
<listitem>
diff --git a/doc/src/sgml/ref/dropuser.sgml b/doc/src/sgml/ref/dropuser.sgml
index 891bbd60371..180fb0bb62e 100644
--- a/doc/src/sgml/ref/dropuser.sgml
+++ b/doc/src/sgml/ref/dropuser.sgml
@@ -92,16 +92,6 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
- <term><option>--if-exists</></term>
- <listitem>
- <para>
- Do not throw an error if the user does not exist. A notice is
- issued in this case.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term><option>-V</></term>
<term><option>--version</></term>
<listitem>
@@ -112,6 +102,16 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>--if-exists</></term>
+ <listitem>
+ <para>
+ Do not throw an error if the user does not exist. A notice is
+ issued in this case.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-?</></term>
<term><option>--help</></term>
<listitem>
diff --git a/doc/src/sgml/ref/ecpg-ref.sgml b/doc/src/sgml/ref/ecpg-ref.sgml
index 9c13e93a271..edd20dcdd55 100644
--- a/doc/src/sgml/ref/ecpg-ref.sgml
+++ b/doc/src/sgml/ref/ecpg-ref.sgml
@@ -202,6 +202,7 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>-?</option></term>
<term><option>--help</option></term>
<listitem>
<para>
diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml
index b2e94e83d8e..11484468ddd 100644
--- a/doc/src/sgml/ref/initdb.sgml
+++ b/doc/src/sgml/ref/initdb.sgml
@@ -326,7 +326,13 @@ PostgreSQL documentation
</para>
</listitem>
</varlistentry>
+ </variablelist>
+ </para>
+ <para>
+ Other options:
+
+ <variablelist>
<varlistentry>
<term><option>-V</></term>
<term><option>--version</></term>
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index d03bedd12a9..ebd6e1e9f86 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -431,7 +431,7 @@ PostgreSQL documentation
</para>
<para>
- Other, less commonly used, options are also available:
+ Other options are also available:
<variablelist>
<varlistentry>
diff --git a/doc/src/sgml/ref/pg_config-ref.sgml b/doc/src/sgml/ref/pg_config-ref.sgml
index 2246b74df01..5aac38b3cec 100644
--- a/doc/src/sgml/ref/pg_config-ref.sgml
+++ b/doc/src/sgml/ref/pg_config-ref.sgml
@@ -273,6 +273,17 @@
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>-?</></term>
+ <term><option>--help</></term>
+ <listitem>
+ <para>
+ Show help about <application>pg_config</application> command line
+ arguments, and exit.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
If more than one option is given, the information is printed in that order,
diff --git a/doc/src/sgml/ref/pg_ctl-ref.sgml b/doc/src/sgml/ref/pg_ctl-ref.sgml
index 1409e0c44e4..37826e9c6c3 100644
--- a/doc/src/sgml/ref/pg_ctl-ref.sgml
+++ b/doc/src/sgml/ref/pg_ctl-ref.sgml
@@ -364,6 +364,16 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>-V</></term>
+ <term><option>--version</></term>
+ <listitem>
+ <para>
+ Print the <application>pg_ctl</application> version and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-w</option></term>
<listitem>
<para>
@@ -388,6 +398,17 @@ PostgreSQL documentation
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>-?</></term>
+ <term><option>--help</></term>
+ <listitem>
+ <para>
+ Show help about <application>pg_ctl</application> command line
+ arguments, and exit.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
<refsect2 id="app-pg-ctl-windows-options">
diff --git a/doc/src/sgml/ref/pg_receivexlog.sgml b/doc/src/sgml/ref/pg_receivexlog.sgml
index 5eefefbe874..63cff478803 100644
--- a/doc/src/sgml/ref/pg_receivexlog.sgml
+++ b/doc/src/sgml/ref/pg_receivexlog.sgml
@@ -211,7 +211,7 @@ PostgreSQL documentation
</para>
<para>
- Other, less commonly used, options are also available:
+ Other options are also available:
<variablelist>
<varlistentry>
diff --git a/doc/src/sgml/ref/postgres-ref.sgml b/doc/src/sgml/ref/postgres-ref.sgml
index d8e9825d13e..4e5cd02589c 100644
--- a/doc/src/sgml/ref/postgres-ref.sgml
+++ b/doc/src/sgml/ref/postgres-ref.sgml
@@ -346,6 +346,16 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>-V</></term>
+ <term><option>--version</></term>
+ <listitem>
+ <para>
+ Print the <application>postgres</application> version and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--<replaceable>name</replaceable>=<replaceable>value</replaceable></option></term>
<listitem>
<para>
@@ -365,6 +375,17 @@ PostgreSQL documentation
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>-?</></term>
+ <term><option>--help</></term>
+ <listitem>
+ <para>
+ Show help about <application>postgres</application> command line
+ arguments, and exit.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect2>
diff --git a/doc/src/sgml/vacuumlo.sgml b/doc/src/sgml/vacuumlo.sgml
index 4640744e8b7..b9629bf2f54 100644
--- a/doc/src/sgml/vacuumlo.sgml
+++ b/doc/src/sgml/vacuumlo.sgml
@@ -50,14 +50,10 @@
<refsect1>
<title>Options</title>
- <variablelist>
- <varlistentry>
- <term><option>-h</option> <replaceable>hostname</></term>
- <listitem>
- <para>Database server's host.</para>
- </listitem>
- </varlistentry>
+ <para>
+ <application>vacuumlo</application> accepts the following command-line arguments:
+ <variablelist>
<varlistentry>
<term><option>-l</option> <replaceable>limit</></term>
<listitem>
@@ -79,23 +75,58 @@
</varlistentry>
<varlistentry>
- <term><option>-p</option> <replaceable>port</></term>
+ <term><option>-v</option></term>
<listitem>
- <para>Database server's port.</para>
+ <para>Write a lot of progress messages.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-U</option> <replaceable>username</></term>
+ <term><option>-V</></term>
+ <term><option>--version</></term>
<listitem>
- <para>User name to connect as.</para>
+ <para>
+ Print the <application>vacuumlo</application> version and exit.
+ </para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-v</option></term>
+ <term><option>-?</></term>
+ <term><option>--help</></term>
<listitem>
- <para>Write a lot of progress messages.</para>
+ <para>
+ Show help about <application>vacuumlo</application> command line
+ arguments, and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+
+ <para>
+ <application>vacuumlo</application> also accepts the following command-line
+ arguments for connection parameters:
+
+ <variablelist>
+ <varlistentry>
+ <term><option>-h</option> <replaceable>hostname</></term>
+ <listitem>
+ <para>Database server's host.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-p</option> <replaceable>port</></term>
+ <listitem>
+ <para>Database server's port.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-U</option> <replaceable>username</></term>
+ <listitem>
+ <para>User name to connect as.</para>
</listitem>
</varlistentry>
@@ -133,6 +164,7 @@
</listitem>
</varlistentry>
</variablelist>
+ </para>
</refsect1>
<refsect1>
diff --git a/src/backend/main/main.c b/src/backend/main/main.c
index 7203481a04b..c7d48e95ad6 100644
--- a/src/backend/main/main.c
+++ b/src/backend/main/main.c
@@ -295,10 +295,10 @@ help(const char *progname)
printf(_(" -p PORT port number to listen on\n"));
printf(_(" -s show statistics after each query\n"));
printf(_(" -S WORK-MEM set amount of memory for sorts (in kB)\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
printf(_(" --NAME=VALUE set run-time parameter\n"));
printf(_(" --describe-config describe configuration parameters, then exit\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nDeveloper options:\n"));
printf(_(" -f s|i|n|m|h forbid use of some plan types\n"));
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 3789948cdfb..bac8385d39f 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -2534,8 +2534,8 @@ usage(const char *progname)
printf(_(" -n, --noclean do not clean up after errors\n"));
printf(_(" -s, --show show internal settings\n"));
printf(_("\nOther options:\n"));
- printf(_(" -?, --help show this help, then exit\n"));
printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nIf the data directory is not specified, the environment variable PGDATA\n"
"is used.\n"));
printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 44fd8a969dd..bc67a3cb4d4 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -118,8 +118,8 @@ usage(void)
printf(_(" -l, --label=LABEL set backup label\n"));
printf(_(" -P, --progress show progress information\n"));
printf(_(" -v, --verbose output verbose messages\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nConnection options:\n"));
printf(_(" -s, --statusint=INTERVAL time between status packets sent to server (in seconds)\n"));
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
diff --git a/src/bin/pg_basebackup/pg_receivexlog.c b/src/bin/pg_basebackup/pg_receivexlog.c
index faa30b2bf06..20adb653cf1 100644
--- a/src/bin/pg_basebackup/pg_receivexlog.c
+++ b/src/bin/pg_basebackup/pg_receivexlog.c
@@ -60,8 +60,8 @@ usage(void)
printf(_(" -D, --directory=DIR receive transaction log files into this directory\n"));
printf(_(" -n, --noloop do not loop on connection lost\n"));
printf(_(" -v, --verbose output verbose messages\n"));
- printf(_(" -?, --help show this help, then exit\n"));
printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nConnection options:\n"));
printf(_(" -s, --statusint=INTERVAL time between status packets sent to server (in seconds)\n"));
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
diff --git a/src/bin/pg_config/pg_config.c b/src/bin/pg_config/pg_config.c
index 6bd3451e4c6..b94cf53f544 100644
--- a/src/bin/pg_config/pg_config.c
+++ b/src/bin/pg_config/pg_config.c
@@ -454,7 +454,7 @@ help(void)
printf(_(" --ldflags_sl show LDFLAGS_SL value used when PostgreSQL was built\n"));
printf(_(" --libs show LIBS value used when PostgreSQL was built\n"));
printf(_(" --version show the PostgreSQL version\n"));
- printf(_(" --help show this help, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nWith no arguments, all known items are shown.\n\n"));
printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n"));
}
diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c
index c00183ab4fe..38c263c08be 100644
--- a/src/bin/pg_controldata/pg_controldata.c
+++ b/src/bin/pg_controldata/pg_controldata.c
@@ -31,17 +31,11 @@ static void
usage(const char *progname)
{
printf(_("%s displays control information of a PostgreSQL database cluster.\n\n"), progname);
- printf
- (
- _(
- "Usage:\n"
- " %s [OPTION] [DATADIR]\n\n"
- "Options:\n"
- " --help show this help, then exit\n"
- " --version output version information, then exit\n"
- ),
- progname
- );
+ printf(_("Usage:\n"));
+ printf(_(" %s [OPTION] [DATADIR]\n"), progname);
+ printf(_("\nOptions:\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nIf no data directory (DATADIR) is specified, "
"the environment variable PGDATA\nis used.\n\n"));
printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n"));
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index d7b836762d8..3826312b8ed 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -1768,10 +1768,10 @@ do_help(void)
printf(_(" -D, --pgdata=DATADIR location of the database storage area\n"));
printf(_(" -s, --silent only print errors, no informational messages\n"));
printf(_(" -t, --timeout=SECS seconds to wait when using -w option\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
printf(_(" -w wait until operation completes\n"));
printf(_(" -W do not wait until operation completes\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("(The default is to wait for shutdown, but not for start or restart.)\n\n"));
printf(_("If the -D option is omitted, the environment variable PGDATA is used.\n"));
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index d9aeee3c8d2..4780c37d302 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -780,10 +780,10 @@ help(const char *progname)
printf(_(" -F, --format=c|d|t|p output file format (custom, directory, tar,\n"
" plain text (default))\n"));
printf(_(" -v, --verbose verbose mode\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
printf(_(" -Z, --compress=0-9 compression level for compressed formats\n"));
printf(_(" --lock-wait-timeout=TIMEOUT fail after waiting TIMEOUT for a table lock\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nOptions controlling the output content:\n"));
printf(_(" -a, --data-only dump only the data, not the schema\n"));
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index 053e5fd36ae..10ce2223df4 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -538,9 +538,9 @@ help(void)
printf(_("\nGeneral options:\n"));
printf(_(" -f, --file=FILENAME output file name\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
printf(_(" --lock-wait-timeout=TIMEOUT fail after waiting TIMEOUT for a table lock\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nOptions controlling the output content:\n"));
printf(_(" -a, --data-only dump only the data, not the schema\n"));
printf(_(" -c, --clean clean (drop) databases before recreating\n"));
diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c
index f3715271939..f6c835be0d1 100644
--- a/src/bin/pg_dump/pg_restore.c
+++ b/src/bin/pg_dump/pg_restore.c
@@ -407,8 +407,8 @@ usage(const char *progname)
printf(_(" -F, --format=c|d|t backup file format (should be automatic)\n"));
printf(_(" -l, --list print summarized TOC of the archive\n"));
printf(_(" -v, --verbose verbose mode\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nOptions controlling the restore:\n"));
printf(_(" -a, --data-only restore only the data, no schema\n"));
diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c
index 65ba9103a63..5ecf5c49304 100644
--- a/src/bin/pg_resetxlog/pg_resetxlog.c
+++ b/src/bin/pg_resetxlog/pg_resetxlog.c
@@ -1035,8 +1035,8 @@ usage(void)
printf(_(" -n no update, just show extracted control values (for testing)\n"));
printf(_(" -o OID set next OID\n"));
printf(_(" -O OFFSET set next multitransaction offset\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
printf(_(" -x XID set next transaction ID\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
}
diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c
index 4a37c3414ca..8868d7151c0 100644
--- a/src/bin/psql/help.c
+++ b/src/bin/psql/help.c
@@ -94,11 +94,11 @@ usage(void)
printf(_(" -l, --list list available databases, then exit\n"));
printf(_(" -v, --set=, --variable=NAME=VALUE\n"
" set psql variable NAME to VALUE\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
printf(_(" -X, --no-psqlrc do not read startup file (~/.psqlrc)\n"));
printf(_(" -1 (\"one\"), --single-transaction\n"
" execute command file as a single transaction\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nInput and output options:\n"));
printf(_(" -a, --echo-all echo all input from script\n"));
diff --git a/src/bin/scripts/clusterdb.c b/src/bin/scripts/clusterdb.c
index 76de70b6efc..05b726d68ea 100644
--- a/src/bin/scripts/clusterdb.c
+++ b/src/bin/scripts/clusterdb.c
@@ -255,8 +255,8 @@ help(const char *progname)
printf(_(" -q, --quiet don't write any messages\n"));
printf(_(" -t, --table=TABLE cluster specific table only\n"));
printf(_(" -v, --verbose write a lot of output\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nConnection options:\n"));
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
printf(_(" -p, --port=PORT database server port\n"));
diff --git a/src/bin/scripts/createdb.c b/src/bin/scripts/createdb.c
index d58c8156468..91b1a24fd32 100644
--- a/src/bin/scripts/createdb.c
+++ b/src/bin/scripts/createdb.c
@@ -260,8 +260,8 @@ help(const char *progname)
printf(_(" --lc-ctype=LOCALE LC_CTYPE setting for the database\n"));
printf(_(" -O, --owner=OWNER database user to own the new database\n"));
printf(_(" -T, --template=TEMPLATE template database to copy\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nConnection options:\n"));
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
printf(_(" -p, --port=PORT database server port\n"));
diff --git a/src/bin/scripts/createlang.c b/src/bin/scripts/createlang.c
index 8268eda6ed3..60066af377f 100644
--- a/src/bin/scripts/createlang.c
+++ b/src/bin/scripts/createlang.c
@@ -237,8 +237,8 @@ help(const char *progname)
printf(_(" -d, --dbname=DBNAME database to install language in\n"));
printf(_(" -e, --echo show the commands being sent to the server\n"));
printf(_(" -l, --list show a list of currently installed languages\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nConnection options:\n"));
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
printf(_(" -p, --port=PORT database server port\n"));
diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c
index 20a1a52a3ae..db3b5d04d8a 100644
--- a/src/bin/scripts/createuser.c
+++ b/src/bin/scripts/createuser.c
@@ -345,12 +345,12 @@ help(const char *progname)
printf(_(" -R, --no-createrole role cannot create roles (default)\n"));
printf(_(" -s, --superuser role will be superuser\n"));
printf(_(" -S, --no-superuser role will not be superuser (default)\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
printf(_(" --interactive prompt for missing role name and attributes rather\n"
" than using defaults\n"));
printf(_(" --replication role can initiate replication\n"));
printf(_(" --no-replication role cannot initiate replication\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nConnection options:\n"));
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
printf(_(" -p, --port=PORT database server port\n"));
diff --git a/src/bin/scripts/dropdb.c b/src/bin/scripts/dropdb.c
index 10ed67df8b2..583655de6ae 100644
--- a/src/bin/scripts/dropdb.c
+++ b/src/bin/scripts/dropdb.c
@@ -157,9 +157,9 @@ help(const char *progname)
printf(_("\nOptions:\n"));
printf(_(" -e, --echo show the commands being sent to the server\n"));
printf(_(" -i, --interactive prompt before deleting anything\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
printf(_(" --if-exists don't report error if database doesn't exist\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nConnection options:\n"));
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
printf(_(" -p, --port=PORT database server port\n"));
diff --git a/src/bin/scripts/droplang.c b/src/bin/scripts/droplang.c
index 74553c19fdd..4772dc514e3 100644
--- a/src/bin/scripts/droplang.c
+++ b/src/bin/scripts/droplang.c
@@ -238,8 +238,8 @@ help(const char *progname)
printf(_(" -d, --dbname=DBNAME database from which to remove the language\n"));
printf(_(" -e, --echo show the commands being sent to the server\n"));
printf(_(" -l, --list show a list of currently installed languages\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nConnection options:\n"));
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
printf(_(" -p, --port=PORT database server port\n"));
diff --git a/src/bin/scripts/dropuser.c b/src/bin/scripts/dropuser.c
index 85b73a42ac2..d0bf6ff4978 100644
--- a/src/bin/scripts/dropuser.c
+++ b/src/bin/scripts/dropuser.c
@@ -159,9 +159,9 @@ help(const char *progname)
printf(_(" -e, --echo show the commands being sent to the server\n"));
printf(_(" -i, --interactive prompt before deleting anything, and prompt for\n"
" role name if not specified\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
printf(_(" --if-exists don't report error if user doesn't exist\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nConnection options:\n"));
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
printf(_(" -p, --port=PORT database server port\n"));
diff --git a/src/bin/scripts/reindexdb.c b/src/bin/scripts/reindexdb.c
index 35254f20cb2..5b56656f001 100644
--- a/src/bin/scripts/reindexdb.c
+++ b/src/bin/scripts/reindexdb.c
@@ -335,8 +335,8 @@ help(const char *progname)
printf(_(" -q, --quiet don't write any messages\n"));
printf(_(" -s, --system reindex system catalogs\n"));
printf(_(" -t, --table=TABLE reindex specific table only\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nConnection options:\n"));
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
printf(_(" -p, --port=PORT database server port\n"));
diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c
index 6221bdc30d3..fbc132caa91 100644
--- a/src/bin/scripts/vacuumdb.c
+++ b/src/bin/scripts/vacuumdb.c
@@ -350,10 +350,10 @@ help(const char *progname)
printf(_(" -q, --quiet don't write any messages\n"));
printf(_(" -t, --table='TABLE[(COLUMNS)]' vacuum specific table only\n"));
printf(_(" -v, --verbose write a lot of output\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
printf(_(" -z, --analyze update optimizer statistics\n"));
printf(_(" -Z, --analyze-only only update optimizer statistics\n"));
- printf(_(" --help show this help, then exit\n"));
- printf(_(" --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nConnection options:\n"));
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
printf(_(" -p, --port=PORT database server port\n"));
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c
index 8a4cebc6e2c..7e7bae30a0b 100644
--- a/src/interfaces/ecpg/preproc/ecpg.c
+++ b/src/interfaces/ecpg/preproc/ecpg.c
@@ -54,8 +54,8 @@ help(const char *progname)
" \"no_indicator\", \"prepare\", \"questionmarks\"\n"));
printf(_(" --regression run in regression testing mode\n"));
printf(_(" -t turn on autocommit of transactions\n"));
- printf(_(" --help show this help, then exit\n"));
printf(_(" --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
printf(_("\nIf no output file is specified, the name is formed by adding .c to the\n"
"input file name, after stripping off .pgc if present.\n"));
printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));