Content-Length: 1237998 | pFad | http://github.com/tonybelloni/postgres/commit/bb7520cc26dcd392e3dce294b685b3a0d6dae9e9

CC Make documentation of --help and --version options more consistent · tonybelloni/postgres@bb7520c · GitHub
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

+14-14
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

+5-5
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

+2-2
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

+1-1
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

+6-6
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

+11-10
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

+21
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

+20
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

+20
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

+20
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

doc/src/sgml/pgtestfsync.sgml

+20
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,26 @@
7575
</listitem>
7676
</varlistentry>
7777

78+
<varlistentry>
79+
<term><option>-V</></term>
80+
<term><option>--version</></term>
81+
<listitem>
82+
<para>
83+
Print the <application>pg_test_fsync</application> version and exit.
84+
</para>
85+
</listitem>
86+
</varlistentry>
87+
88+
<varlistentry>
89+
<term><option>-?</></term>
90+
<term><option>--help</></term>
91+
<listitem>
92+
<para>
93+
Show help about <application>pg_test_fsync</application> command line
94+
arguments, and exit.
95+
</para>
96+
</listitem>
97+
</varlistentry>
7898
</variablelist>
7999
</para>
80100

doc/src/sgml/pgtesttiming.sgml

+21
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,27 @@
5656
</listitem>
5757
</varlistentry>
5858

59+
<varlistentry>
60+
<term><option>-V</></term>
61+
<term><option>--version</></term>
62+
<listitem>
63+
<para>
64+
Print the <application>pg_test_timing</application> version and exit.
65+
</para>
66+
</listitem>
67+
</varlistentry>
68+
69+
<varlistentry>
70+
<term><option>-?</></term>
71+
<term><option>--help</></term>
72+
<listitem>
73+
<para>
74+
Show help about <application>pg_test_timing</application> command line
75+
arguments, and exit.
76+
</para>
77+
</listitem>
78+
</varlistentry>
79+
5980
</variablelist>
6081
</para>
6182

doc/src/sgml/ref/createuser.sgml

+15-15
Original file line numberDiff line numberDiff line change
@@ -257,35 +257,35 @@ PostgreSQL documentation
257257
</varlistentry>
258258

259259
<varlistentry>
260-
<term><option>--replication</></term>
261-
<listitem>
260+
<term><option>-V</></term>
261+
<term><option>--version</></term>
262+
<listitem>
262263
<para>
263-
The new user will have the REPLICATION privilege, which is
264-
described more fully in the documentation for
265-
<xref linkend="sql-createrole">.
264+
Print the <application>createuser</application> version and exit.
266265
</para>
267-
</listitem>
266+
</listitem>
268267
</varlistentry>
269268

270269
<varlistentry>
271-
<term><option>--no-replication</></term>
270+
<term><option>--replication</></term>
272271
<listitem>
273272
<para>
274-
The new user will not have the REPLICATION privilege, which is
275-
described more fully in the documentation for
276-
<xref linkend="sql-createrole">.
273+
The new user will have the <literal>REPLICATION</literal> privilege,
274+
which is described more fully in the documentation for <xref
275+
linkend="sql-createrole">.
277276
</para>
278277
</listitem>
279278
</varlistentry>
280279

281280
<varlistentry>
282-
<term><option>-V</></term>
283-
<term><option>--version</></term>
284-
<listitem>
281+
<term><option>--no-replication</></term>
282+
<listitem>
285283
<para>
286-
Print the <application>createuser</application> version and exit.
284+
The new user will not have the <literal>REPLICATION</literal>
285+
privilege, which is described more fully in the documentation for <xref
286+
linkend="sql-createrole">.
287287
</para>
288-
</listitem>
288+
</listitem>
289289
</varlistentry>
290290

291291
<varlistentry>

doc/src/sgml/ref/dropdb.sgml

+10-10
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,6 @@ PostgreSQL documentation
8686
</listitem>
8787
</varlistentry>
8888

89-
<varlistentry>
90-
<term><option>--if-exists</></term>
91-
<listitem>
92-
<para>
93-
Do not throw an error if the database does not exist. A notice is issued
94-
in this case.
95-
</para>
96-
</listitem>
97-
</varlistentry>
98-
9989
<varlistentry>
10090
<term><option>-V</></term>
10191
<term><option>--version</></term>
@@ -106,6 +96,16 @@ PostgreSQL documentation
10696
</listitem>
10797
</varlistentry>
10898

99+
<varlistentry>
100+
<term><option>--if-exists</></term>
101+
<listitem>
102+
<para>
103+
Do not throw an error if the database does not exist. A notice is issued
104+
in this case.
105+
</para>
106+
</listitem>
107+
</varlistentry>
108+
109109
<varlistentry>
110110
<term><option>-?</></term>
111111
<term><option>--help</></term>

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/tonybelloni/postgres/commit/bb7520cc26dcd392e3dce294b685b3a0d6dae9e9

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy