Thread: [HACKERS] pg_regress help output

[HACKERS] pg_regress help output

From
Joe Conway
Date:
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

Attachment

Re: [HACKERS] pg_regress help output

From
Tom Lane
Date:
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

Re: [HACKERS] pg_regress help output

From
Joe Conway
Date:
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


Re: [HACKERS] pg_regress help output

From
Tom Lane
Date:
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

Re: [HACKERS] pg_regress help output

From
Peter Eisentraut
Date:
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

Re: [HACKERS] pg_regress help output

From
Joe Conway
Date:
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