pg_regress help output
I have been annoyed at least twice now by the lack of pg_regress command
line help output for the "--bindir=<path>" option. In passing I noted
that there was no output for "--help" or "--version" options either.
Any objections to the attached? It could be argued that it ought to be
back-patched too, but I won't bother unless someone cares enough to
request it.
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
Attachments:
pg_regress-help-20171010.000.difftext/x-patch; name=pg_regress-help-20171010.000.diffDownload
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 7c628df..f3dcc1f 100644
*** a/src/test/regress/pg_regress.c
--- b/src/test/regress/pg_regress.c
*************** help(void)
*** 2004,2040 ****
printf(_("Usage:\n %s [OPTION]... [EXTRA-TEST]...\n"), progname);
printf(_("\n"));
printf(_("Options:\n"));
! printf(_(" --config-auth=DATADIR update authentication settings for DATADIR\n"));
! printf(_(" --create-role=ROLE create the specified role before testing\n"));
! printf(_(" --dbname=DB use database DB (default \"regression\")\n"));
! printf(_(" --debug turn on debug mode in programs that are run\n"));
! printf(_(" --dlpath=DIR look for dynamic libraries in DIR\n"));
! printf(_(" --encoding=ENCODING use ENCODING as the encoding\n"));
! printf(_(" --inputdir=DIR take input files from DIR (default \".\")\n"));
! printf(_(" --launcher=CMD use CMD as launcher of psql\n"));
! printf(_(" --load-extension=EXT load the named extension before running the\n"));
! printf(_(" tests; can appear multiple times\n"));
! printf(_(" --load-language=LANG load the named language before running the\n"));
! printf(_(" tests; can appear multiple times\n"));
! printf(_(" --max-connections=N maximum number of concurrent connections\n"));
! printf(_(" (default is 0, meaning unlimited)\n"));
! printf(_(" --max-concurrent-tests=N maximum number of concurrent tests in schedule\n"));
! printf(_(" (default is 0, meaning unlimited)\n"));
! printf(_(" --outputdir=DIR place output files in DIR (default \".\")\n"));
! printf(_(" --schedule=FILE use test ordering schedule from FILE\n"));
! printf(_(" (can be used multiple times to concatenate)\n"));
! printf(_(" --temp-instance=DIR create a temporary instance in DIR\n"));
! printf(_(" --use-existing use an existing installation\n"));
printf(_("\n"));
printf(_("Options for \"temp-instance\" mode:\n"));
! printf(_(" --no-locale use C locale\n"));
! printf(_(" --port=PORT start postmaster on PORT\n"));
! printf(_(" --temp-config=FILE append contents of FILE to temporary config\n"));
printf(_("\n"));
printf(_("Options for using an existing installation:\n"));
! printf(_(" --host=HOST use postmaster running on HOST\n"));
! printf(_(" --port=PORT use postmaster running at PORT\n"));
! printf(_(" --user=USER connect as USER\n"));
printf(_("\n"));
printf(_("The exit status is 0 if all tests passed, 1 if some tests failed, and 2\n"));
printf(_("if the tests could not be run for some reason.\n"));
--- 2004,2044 ----
printf(_("Usage:\n %s [OPTION]... [EXTRA-TEST]...\n"), progname);
printf(_("\n"));
printf(_("Options:\n"));
! printf(_(" --bindir=BINPATH use BINPATH for programs that are run;\n"));
! printf(_(" if BINPATH empty, use PATH from the environment\n"));
! printf(_(" --config-auth=DATADIR update authentication settings for DATADIR\n"));
! printf(_(" --create-role=ROLE create the specified role before testing\n"));
! printf(_(" --dbname=DB use database DB (default \"regression\")\n"));
! printf(_(" --debug turn on debug mode in programs that are run\n"));
! printf(_(" --dlpath=DIR look for dynamic libraries in DIR\n"));
! printf(_(" --encoding=ENCODING use ENCODING as the encoding\n"));
! printf(_(" -h, --help show this help, then exit\n"));
! printf(_(" --inputdir=DIR take input files from DIR (default \".\")\n"));
! printf(_(" --launcher=CMD use CMD as launcher of psql\n"));
! printf(_(" --load-extension=EXT load the named extension before running the\n"));
! printf(_(" tests; can appear multiple times\n"));
! printf(_(" --load-language=LANG load the named language before running the\n"));
! printf(_(" tests; can appear multiple times\n"));
! printf(_(" --max-connections=N maximum number of concurrent connections\n"));
! printf(_(" (default is 0, meaning unlimited)\n"));
! printf(_(" --max-concurrent-tests=N maximum number of concurrent tests in schedule\n"));
! printf(_(" (default is 0, meaning unlimited)\n"));
! printf(_(" --outputdir=DIR place output files in DIR (default \".\")\n"));
! printf(_(" --schedule=FILE use test ordering schedule from FILE\n"));
! printf(_(" (can be used multiple times to concatenate)\n"));
! printf(_(" --temp-instance=DIR create a temporary instance in DIR\n"));
! printf(_(" --use-existing use an existing installation\n"));
! printf(_(" -V, --version output version information, then exit\n"));
printf(_("\n"));
printf(_("Options for \"temp-instance\" mode:\n"));
! printf(_(" --no-locale use C locale\n"));
! printf(_(" --port=PORT start postmaster on PORT\n"));
! printf(_(" --temp-config=FILE append contents of FILE to temporary config\n"));
printf(_("\n"));
printf(_("Options for using an existing installation:\n"));
! printf(_(" --host=HOST use postmaster running on HOST\n"));
! printf(_(" --port=PORT use postmaster running at PORT\n"));
! printf(_(" --user=USER connect as USER\n"));
printf(_("\n"));
printf(_("The exit status is 0 if all tests passed, 1 if some tests failed, and 2\n"));
printf(_("if the tests could not be run for some reason.\n"));
Joe Conway <mail@joeconway.com> writes:
I have been annoyed at least twice now by the lack of pg_regress command
line help output for the "--bindir=<path>" option. In passing I noted
that there was no output for "--help" or "--version" options either.
Any objections to the attached?
+1 for documenting it, but the phrasing seems a bit awkward:
! printf(_(" --bindir=BINPATH use BINPATH for programs that are run;\n"));
! printf(_(" if BINPATH empty, use PATH from the environment\n"));
Maybe just "if empty, use PATH ..." ?
Also, why is the patch apparently changing whitespace in all the help
lines? Seems like that will create a lot of make-work for translators.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 10/10/2017 07:06 PM, Tom Lane wrote:
Joe Conway <mail@joeconway.com> writes:
I have been annoyed at least twice now by the lack of pg_regress command
line help output for the "--bindir=<path>" option. In passing I noted
that there was no output for "--help" or "--version" options either.Any objections to the attached?
+1 for documenting it, but the phrasing seems a bit awkward:
! printf(_(" --bindir=BINPATH use BINPATH for programs that are run;\n"));
! printf(_(" if BINPATH empty, use PATH from the environment\n"));Maybe just "if empty, use PATH ..." ?
Ok, so like this?
8<----------
--bindir=BINPATH use BINPATH for programs that are run;\n"));
if empty, use PATH from the environment\n"));
8<----------
Also, why is the patch apparently changing whitespace in all the help
lines? Seems like that will create a lot of make-work for translators.
I debated with myself about that.
In other cases, e.g. initdb or psql, where we mix short+long options and
long-only options, we indent the long-only options in the output to
match up with the long-options of the mixed lines (whew, hopefully that
is clear).
Previously we were not showing mixed short+long options for pg_regress
at all, and hence only indenting the long-only options minimally. But
the addition of -h and -V (again consistent with other programs we
ship), it made sense to be consistent in the way we indent.
But I am fine with leaving the original lines output the way they were
if preferred.
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
Tom Lane wrote:
Joe Conway <mail@joeconway.com> writes:
I have been annoyed at least twice now by the lack of pg_regress command
line help output for the "--bindir=<path>" option. In passing I noted
that there was no output for "--help" or "--version" options either.Any objections to the attached?
+1 for documenting it, but the phrasing seems a bit awkward:
! printf(_(" --bindir=BINPATH use BINPATH for programs that are run;\n"));
! printf(_(" if BINPATH empty, use PATH from the environment\n"));Maybe just "if empty, use PATH ..." ?
Also, why is the patch apparently changing whitespace in all the help
lines? Seems like that will create a lot of make-work for translators.
I think we don't have translations for pg_regress.
--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
Tom Lane wrote:
Also, why is the patch apparently changing whitespace in all the help
lines? Seems like that will create a lot of make-work for translators.
I think we don't have translations for pg_regress.
Good point --- objection withdrawn.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 10/10/17 22:31, Joe Conway wrote:
Also, why is the patch apparently changing whitespace in all the help
lines? Seems like that will create a lot of make-work for translators.I debated with myself about that.
Well, there are no translations of pg_regress, so please change the
whitespace to make it look best.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 10/14/2017 02:04 PM, Peter Eisentraut wrote:
On 10/10/17 22:31, Joe Conway wrote:
Also, why is the patch apparently changing whitespace in all the help
lines? Seems like that will create a lot of make-work for translators.I debated with myself about that.
Well, there are no translations of pg_regress, so please change the
whitespace to make it look best.
Committed that way.
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development