Skip to content

Commit bb7520c

Browse files
committed
Make documentation of --help and --version options more consistent
Before, some places didn't document the short options (-? and -V), some documented both, some documented nothing, and they were listed in various orders. Now this is hopefully more consistent and complete.
1 parent 9e18eac commit bb7520c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+346
-137
lines changed

contrib/oid2name/oid2name.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -179,20 +179,20 @@ help(const char *progname)
179179
"Usage:\n"
180180
" %s [OPTION]...\n"
181181
"\nOptions:\n"
182-
" -d DBNAME database to connect to\n"
183-
" -f FILENODE show info for table with given file node\n"
184-
" -H HOSTNAME database server host or socket directory\n"
185-
" -i show indexes and sequences too\n"
186-
" -o OID show info for table with given OID\n"
187-
" -p PORT database server port number\n"
188-
" -q quiet (don't show headers)\n"
189-
" -s show all tablespaces\n"
190-
" -S show system objects too\n"
191-
" -t TABLE show info for named table\n"
192-
" -U NAME connect as specified database user\n"
193-
" -x extended (show additional columns)\n"
194-
" --help show this help, then exit\n"
195-
" --version output version information, then exit\n"
182+
" -d DBNAME database to connect to\n"
183+
" -f FILENODE show info for table with given file node\n"
184+
" -H HOSTNAME database server host or socket directory\n"
185+
" -i show indexes and sequences too\n"
186+
" -o OID show info for table with given OID\n"
187+
" -p PORT database server port number\n"
188+
" -q quiet (don't show headers)\n"
189+
" -s show all tablespaces\n"
190+
" -S show system objects too\n"
191+
" -t TABLE show info for named table\n"
192+
" -U NAME connect as specified database user\n"
193+
" -V, --version output version information, then exit\n"
194+
" -x extended (show additional columns)\n"
195+
" -?, --help show this help, then exit\n"
196196
"\nThe default action is to show all database OIDs.\n\n"
197197
"Report bugs to <pgsql-bugs@postgresql.org>.\n",
198198
progname, progname);

contrib/pg_archivecleanup/pg_archivecleanup.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,11 @@ usage(void)
249249
printf("Usage:\n");
250250
printf(" %s [OPTION]... ARCHIVELOCATION OLDESTKEPTWALFILE\n", progname);
251251
printf("\nOptions:\n");
252-
printf(" -d generate debug output (verbose mode)\n");
253-
printf(" -n dry run, show the names of the files that would be removed\n");
254-
printf(" -x EXT clean up files if they have this extension\n");
255-
printf(" --help show this help, then exit\n");
256-
printf(" --version output version information, then exit\n");
252+
printf(" -d generate debug output (verbose mode)\n");
253+
printf(" -n dry run, show the names of the files that would be removed\n");
254+
printf(" -V, --version output version information, then exit\n");
255+
printf(" -x EXT clean up files if they have this extension\n");
256+
printf(" -?, --help show this help, then exit\n");
257257
printf("\n"
258258
"For use as archive_cleanup_command in recovery.conf when standby_mode = on:\n"
259259
" archive_cleanup_command = 'pg_archivecleanup [OPTION]... ARCHIVELOCATION %%r'\n"

contrib/pg_standby/pg_standby.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,9 +527,9 @@ usage(void)
527527
printf(" -s SLEEPTIME seconds to wait between file checks (min=1, max=60,\n"
528528
" default=5)\n");
529529
printf(" -t TRIGGERFILE trigger file to initiate failover (no default)\n");
530+
printf(" -V, --version output version information, then exit\n");
530531
printf(" -w MAXWAITTIME max seconds to wait for a file (0=no limit) (default=0)\n");
531-
printf(" --help show this help, then exit\n");
532-
printf(" --version output version information, then exit\n");
532+
printf(" -?, --help show this help, then exit\n");
533533
printf("\n"
534534
"Main intended use as restore_command in recovery.conf:\n"
535535
" restore_command = 'pg_standby [OPTION]... ARCHIVELOCATION %%f %%p %%r'\n"

contrib/pg_upgrade/option.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Options:\n\
236236
-u, --user=NAME cluster superuser (default \"%s\")\n\
237237
-v, --verbose enable verbose internal logging\n\
238238
-V, --version display version information, then exit\n\
239-
-h, --help show this help, then exit\n\
239+
-?, -h, --help show this help, then exit\n\
240240
\n\
241241
Before running pg_upgrade you must:\n\
242242
create a new database cluster (using the new version of initdb)\n\

contrib/pgbench/pgbench.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,12 @@ usage(const char *progname)
368368
" -T NUM duration of benchmark test in seconds\n"
369369
" -v vacuum all four standard tables before tests\n"
370370
"\nCommon options:\n"
371-
" -d print debugging output\n"
372-
" -h HOSTNAME database server host or socket directory\n"
373-
" -p PORT database server port number\n"
374-
" -U USERNAME connect as specified database user\n"
375-
" --help show this help, then exit\n"
376-
" --version output version information, then exit\n"
371+
" -d print debugging output\n"
372+
" -h HOSTNAME database server host or socket directory\n"
373+
" -p PORT database server port number\n"
374+
" -U USERNAME connect as specified database user\n"
375+
" -V, --version output version information, then exit\n"
376+
" -?, --help show this help, then exit\n"
377377
"\n"
378378
"Report bugs to <pgsql-bugs@postgresql.org>.\n",
379379
progname, progname);

contrib/vacuumlo/vacuumlo.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -384,16 +384,17 @@ usage(const char *progname)
384384
printf("%s removes unreferenced large objects from databases.\n\n", progname);
385385
printf("Usage:\n %s [OPTION]... DBNAME...\n\n", progname);
386386
printf("Options:\n");
387-
printf(" -h HOSTNAME database server host or socket directory\n");
388-
printf(" -l LIMIT commit after removing each LIMIT large objects\n");
389-
printf(" -n don't remove large objects, just show what would be done\n");
390-
printf(" -p PORT database server port\n");
391-
printf(" -U USERNAME user name to connect as\n");
392-
printf(" -w never prompt for password\n");
393-
printf(" -W force password prompt\n");
394-
printf(" -v write a lot of progress messages\n");
395-
printf(" --help show this help, then exit\n");
396-
printf(" --version output version information, then exit\n");
387+
printf(" -l LIMIT commit after removing each LIMIT large objects\n");
388+
printf(" -n don't remove large objects, just show what would be done\n");
389+
printf(" -v write a lot of progress messages\n");
390+
printf(" -V, --version output version information, then exit\n");
391+
printf(" -?, --help show this help, then exit\n");
392+
printf("\nConnection options:\n");
393+
printf(" -h HOSTNAME database server host or socket directory\n");
394+
printf(" -p PORT database server port\n");
395+
printf(" -U USERNAME user name to connect as\n");
396+
printf(" -w never prompt for password\n");
397+
printf(" -W force password prompt\n");
397398
printf("\n");
398399
printf("Report bugs to <pgsql-bugs@postgresql.org>.\n");
399400
}

doc/src/sgml/oid2name.sgml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,33 @@
9797
<listitem><para>show info for table(s) matching <replaceable>tablename_pattern</></para></listitem>
9898
</varlistentry>
9999

100+
<varlistentry>
101+
<term><option>-V</></term>
102+
<term><option>--version</></term>
103+
<listitem>
104+
<para>
105+
Print the <application>oid2name</application> version and exit.
106+
</para>
107+
</listitem>
108+
</varlistentry>
109+
100110
<varlistentry>
101111
<term><option>-x</option></term>
102112
<listitem><para>display more information about each object shown: tablespace name,
103113
schema name, and OID
104114
</para></listitem>
105115
</varlistentry>
116+
117+
<varlistentry>
118+
<term><option>-?</></term>
119+
<term><option>--help</></term>
120+
<listitem>
121+
<para>
122+
Show help about <application>oid2name</application> command line
123+
arguments, and exit.
124+
</para>
125+
</listitem>
126+
</varlistentry>
106127
</variablelist>
107128
</para>
108129

doc/src/sgml/pgarchivecleanup.sgml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,16 @@ pg_archivecleanup: removing file "archive/00000001000000370000000E"
106106
</listitem>
107107
</varlistentry>
108108

109+
<varlistentry>
110+
<term><option>-V</></term>
111+
<term><option>--version</></term>
112+
<listitem>
113+
<para>
114+
Print the <application>pg_archivecleanup</application> version and exit.
115+
</para>
116+
</listitem>
117+
</varlistentry>
118+
109119
<varlistentry>
110120
<term><option>-x</option> <replaceable>extension</></term>
111121
<listitem>
@@ -126,6 +136,16 @@ pg_archivecleanup: removing file "archive/00000001000000370000000E"
126136
</listitem>
127137
</varlistentry>
128138

139+
<varlistentry>
140+
<term><option>-?</></term>
141+
<term><option>--help</></term>
142+
<listitem>
143+
<para>
144+
Show help about <application>pg_archivecleanup</application> command line
145+
arguments, and exit.
146+
</para>
147+
</listitem>
148+
</varlistentry>
129149
</variablelist>
130150
</para>
131151
</refsect1>

doc/src/sgml/pgbench.sgml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,26 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</>
453453
</listitem>
454454
</varlistentry>
455455

456+
<varlistentry>
457+
<term><option>-V</></term>
458+
<term><option>--version</></term>
459+
<listitem>
460+
<para>
461+
Print the <application>pgbench</application> version and exit.
462+
</para>
463+
</listitem>
464+
</varlistentry>
465+
466+
<varlistentry>
467+
<term><option>-?</></term>
468+
<term><option>--help</></term>
469+
<listitem>
470+
<para>
471+
Show help about <application>pgbench</application> command line
472+
arguments, and exit.
473+
</para>
474+
</listitem>
475+
</varlistentry>
456476
</variablelist>
457477
</para>
458478

doc/src/sgml/pgstandby.sgml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,16 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r'
198198
</listitem>
199199
</varlistentry>
200200

201+
<varlistentry>
202+
<term><option>-V</></term>
203+
<term><option>--version</></term>
204+
<listitem>
205+
<para>
206+
Print the <application>pg_standby</application> version and exit.
207+
</para>
208+
</listitem>
209+
</varlistentry>
210+
201211
<varlistentry>
202212
<term><option>-w</option> <replaceable>maxwaittime</></term>
203213
<listitem>
@@ -211,6 +221,16 @@ restore_command = 'pg_standby <replaceable>archiveDir</> %f %p %r'
211221
</listitem>
212222
</varlistentry>
213223

224+
<varlistentry>
225+
<term><option>-?</></term>
226+
<term><option>--help</></term>
227+
<listitem>
228+
<para>
229+
Show help about <application>pg_standby</application> command line
230+
arguments, and exit.
231+
</para>
232+
</listitem>
233+
</varlistentry>
214234
</variablelist>
215235
</para>
216236

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy