From 5878a377ba47a39d8d3ecc1240986916eb9dbaf5 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 16 Sep 2015 00:37:39 -0400 Subject: [PATCH] Review program help output for wording and formatting --- src/bin/pg_basebackup/pg_receivexlog.c | 2 +- src/bin/pg_basebackup/pg_recvlogical.c | 2 +- src/bin/pg_controldata/pg_controldata.c | 3 ++- src/bin/pg_dump/pg_dump.c | 3 ++- src/bin/pg_dump/pg_restore.c | 2 +- src/bin/pg_resetxlog/pg_resetxlog.c | 3 ++- src/bin/pg_rewind/pg_rewind.c | 4 ++-- src/bin/pgbench/pgbench.c | 3 +-- src/bin/psql/help.c | 7 ++++--- src/bin/scripts/vacuumdb.c | 6 +++--- 10 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/bin/pg_basebackup/pg_receivexlog.c b/src/bin/pg_basebackup/pg_receivexlog.c index ca648d9716..0c322d1cd9 100644 --- a/src/bin/pg_basebackup/pg_receivexlog.c +++ b/src/bin/pg_basebackup/pg_receivexlog.c @@ -67,7 +67,7 @@ usage(void) printf(_(" %s [OPTION]...\n"), progname); printf(_("\nOptions:\n")); printf(_(" -D, --directory=DIR receive transaction log files into this directory\n")); - printf(_(" --if-not-exists do not treat naming conflicts as an error when creating a slot\n")); + printf(_(" --if-not-exists do not error if slot already exists when creating a slot\n")); printf(_(" -n, --no-loop do not loop on connection lost\n")); printf(_(" -s, --status-interval=SECS\n" " time between status packets sent to server (default: %d)\n"), (standby_message_timeout / 1000)); diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c index f189f71eff..93f61c359a 100644 --- a/src/bin/pg_basebackup/pg_recvlogical.c +++ b/src/bin/pg_basebackup/pg_recvlogical.c @@ -76,7 +76,7 @@ usage(void) printf(_(" -f, --file=FILE receive log into this file, - for stdout\n")); printf(_(" -F --fsync-interval=SECS\n" " time between fsyncs to the output file (default: %d)\n"), (fsync_interval / 1000)); - printf(_(" --if-not-exists do not treat naming conflicts as an error when creating a slot\n")); + printf(_(" --if-not-exists do not error if slot already exists when creating a slot\n")); printf(_(" -I, --startpos=LSN where in an existing slot should the streaming start\n")); printf(_(" -n, --no-loop do not loop on connection lost\n")); printf(_(" -o, --option=NAME[=VALUE]\n" diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c index 046480cc28..704f72d3c5 100644 --- a/src/bin/pg_controldata/pg_controldata.c +++ b/src/bin/pg_controldata/pg_controldata.c @@ -34,8 +34,9 @@ usage(const char *progname) { printf(_("%s displays control information of a PostgreSQL database cluster.\n\n"), progname); printf(_("Usage:\n")); - printf(_(" %s [OPTION] [[-D] DATADIR]\n"), progname); + printf(_(" %s [OPTION] [DATADIR]\n"), progname); printf(_("\nOptions:\n")); + printf(_(" [-D] DATADIR data directory\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, " diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 05866970a6..3c08778dc7 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -904,7 +904,8 @@ help(const char *progname) printf(_(" --column-inserts dump data as INSERT commands with column names\n")); printf(_(" --disable-dollar-quoting disable dollar quoting, use SQL standard quoting\n")); printf(_(" --disable-triggers disable triggers during data-only restore\n")); - printf(_(" --enable-row-security enable row level security\n")); + printf(_(" --enable-row-security enable row security (dump only content user has\n" + " access to)\n")); printf(_(" --exclude-table-data=TABLE do NOT dump data for the named table(s)\n")); printf(_(" --if-exists use IF EXISTS when dropping objects\n")); printf(_(" --inserts dump data as INSERT commands, rather than COPY\n")); diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c index 75c08b9830..af8dff50e6 100644 --- a/src/bin/pg_dump/pg_restore.c +++ b/src/bin/pg_dump/pg_restore.c @@ -463,7 +463,7 @@ usage(const char *progname) printf(_(" -x, --no-privileges skip restoration of access privileges (grant/revoke)\n")); printf(_(" -1, --single-transaction restore as a single transaction\n")); printf(_(" --disable-triggers disable triggers during data-only restore\n")); - printf(_(" --enable-row-security enable row level security\n")); + printf(_(" --enable-row-security enable row security\n")); printf(_(" --if-exists use IF EXISTS when dropping objects\n")); printf(_(" --no-data-for-failed-tables do not restore data of tables that could not be\n" " created\n")); diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c index b771a63317..c8c1ac3288 100644 --- a/src/bin/pg_resetxlog/pg_resetxlog.c +++ b/src/bin/pg_resetxlog/pg_resetxlog.c @@ -1165,10 +1165,11 @@ static void usage(void) { printf(_("%s resets the PostgreSQL transaction log.\n\n"), progname); - printf(_("Usage:\n %s [OPTION]... {[-D] DATADIR}\n\n"), progname); + printf(_("Usage:\n %s [OPTION]... DATADIR\n\n"), progname); printf(_("Options:\n")); printf(_(" -c XID,XID set oldest and newest transactions bearing commit timestamp\n")); printf(_(" (zero in either value means no change)\n")); + printf(_(" [-D] DATADIR data directory\n")); printf(_(" -e XIDEPOCH set next transaction ID epoch\n")); printf(_(" -f force update to be done\n")); printf(_(" -l XLOGFILE force minimum WAL starting location for new transaction log\n")); diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 032301fc2a..4b7e26aac1 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -60,8 +60,8 @@ usage(const char *progname) printf(_("Usage:\n %s [OPTION]...\n\n"), progname); printf(_("Options:\n")); printf(_(" -D, --target-pgdata=DIRECTORY existing data directory to modify\n")); - printf(_(" --source-pgdata=DIRECTORY source data directory to sync with\n")); - printf(_(" --source-server=CONNSTR source server to sync with\n")); + printf(_(" --source-pgdata=DIRECTORY source data directory to synchronize with\n")); + printf(_(" --source-server=CONNSTR source server to synchronize with\n")); printf(_(" -n, --dry-run stop before modifying anything\n")); printf(_(" -P, --progress write progress messages\n")); printf(_(" --debug write a lot of debug messages\n")); diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 6894345e60..4071a4247b 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -373,8 +373,7 @@ usage(void) " -f, --file=FILENAME read transaction script from FILENAME\n" " -j, --jobs=NUM number of threads (default: 1)\n" " -l, --log write transaction times to log file\n" - " -L, --latency-limit=NUM count transactions lasting more than NUM ms\n" - " as late.\n" + " -L, --latency-limit=NUM count transactions lasting more than NUM ms as late\n" " -M, --protocol=simple|extended|prepared\n" " protocol for submitting queries (default: simple)\n" " -n, --no-vacuum do not run VACUUM before tests\n" diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index 14d351f868..5b63e76ac9 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -85,14 +85,15 @@ usage(unsigned short int pager) fprintf(output, _(" -f, --file=FILENAME execute commands from file, then exit\n")); fprintf(output, _(" -l, --list list available databases, then exit\n")); fprintf(output, _(" -v, --set=, --variable=NAME=VALUE\n" - " set psql variable NAME to VALUE e.g.: -v ON_ERROR_STOP=1\n")); + " set psql variable NAME to VALUE\n" + " (e.g., -v ON_ERROR_STOP=1)\n")); fprintf(output, _(" -V, --version output version information, then exit\n")); fprintf(output, _(" -X, --no-psqlrc do not read startup file (~/.psqlrc)\n")); fprintf(output, _(" -1 (\"one\"), --single-transaction\n" " execute as a single transaction (if non-interactive)\n")); fprintf(output, _(" -?, --help[=options] show this help, then exit\n")); - fprintf(output, _(" --help=variables show a list of all specially treated variables, then exit\n")); - fprintf(output, _(" --help=commands show a list of backslash commands, then exit\n")); + fprintf(output, _(" --help=commands list backslash commands, then exit\n")); + fprintf(output, _(" --help=variables list special variables, then exit\n")); fprintf(output, _("\nInput and output options:\n")); fprintf(output, _(" -a, --echo-all echo all input from script\n")); diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c index f0dc6a7bd5..4ce27b78c5 100644 --- a/src/bin/scripts/vacuumdb.c +++ b/src/bin/scripts/vacuumdb.c @@ -936,15 +936,15 @@ help(const char *progname) printf(_(" -e, --echo show the commands being sent to the server\n")); printf(_(" -f, --full do full vacuuming\n")); printf(_(" -F, --freeze freeze row transaction information\n")); + printf(_(" -j, --jobs=NUM use this many concurrent connections to vacuum\n")); printf(_(" -q, --quiet don't write any messages\n")); printf(_(" -t, --table='TABLE[(COLUMNS)]' vacuum specific table(s) 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; no vacuum\n")); - printf(_(" -j, --jobs=NUM use this many concurrent connections to vacuum\n")); + printf(_(" -Z, --analyze-only only update optimizer statistics; no vacuum\n")); printf(_(" --analyze-in-stages only update optimizer statistics, in multiple\n" - " stages for faster results; no vacuum\n")); + " stages for faster results; no vacuum\n")); printf(_(" -?, --help show this help, then exit\n")); printf(_("\nConnection options:\n")); printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));