Thread

Commits

  1. Add missing options to pg_regress help() output

  1. pg_regress help output

    Joe Conway <mail@joeconway.com> — 2017-10-11T01:06:03Z

    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
    
  2. Re: pg_regress help output

    Tom Lane <tgl@sss.pgh.pa.us> — 2017-10-11T02:06:38Z

    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
    
    
    
  3. Re: pg_regress help output

    Joe Conway <mail@joeconway.com> — 2017-10-11T02:31:21Z

    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
    
    
  4. Re: pg_regress help output

    Alvaro Herrera <alvherre@alvh.no-ip.org> — 2017-10-11T04:03:06Z

    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
    
    
    
  5. Re: pg_regress help output

    Tom Lane <tgl@sss.pgh.pa.us> — 2017-10-11T14:38:40Z

    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
    
    
    
  6. Re: pg_regress help output

    Peter Eisentraut <peter.eisentraut@2ndquadrant.com> — 2017-10-14T21:04:41Z

    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
    
    
    
  7. Re: pg_regress help output

    Joe Conway <mail@joeconway.com> — 2017-10-15T01:51:39Z

    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