On 2024-May-17, Michael Paquier wrote:

> On Thu, May 16, 2024 at 11:57:10AM +0300, Aleksander Alekseev wrote:
> > I propose my original v1 patch for correcting the --help output of
> > 'postgres' too. I agree with the above comments that corresponding
> > changes in v4 became somewhat unwieldy.
> 
> Thanks for compiling the rest.
> 
> -    printf(_("  --NAME=VALUE       set run-time parameter\n"));
> +    printf(_("  --NAME=VALUE       set run-time parameter, a shorter form of 
> -c\n"));
> 
> This part with cross-references in the output is still meh to me, for
> same reason as for the doc changes I've argued to discard upthread.

Was the idea considered of moving the --NAME=VALUE line to appear
together with -c?  We already do that with "-?, --help" and "-V, --version",
so I think it's pretty reasonable:

Options:
  -B NBUFFERS        number of shared buffers
  -c NAME=VALUE, --NAME=VALUE
                     set run-time parameter
  -C NAME            print value of run-time parameter, then exit
[...]


>          write_stderr("%s does not know where to find the server 
> configuration file.\n"
> -                     "You must specify the --config-file or -D invocation "
> +                     "You must specify the --config-file (or equivalent -c) 
> or -D invocation "

I'd rather change the --help and leave this one alone.


About the final paragraph

        Please read the documentation for the complete list of run-time
        configuration settings and how to set them on the command line or in
        the configuration file.

I was thinking we could mention that using --describe-config here could
help, but the literal output from that is quite ugly and unwieldy, more
suitable for machine consumption than humans.  Would it be useful to add
another output format?  Say, a --describe-config=man prints a
manpage-style table of options with their descriptions and links to the
online manual.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"No nos atrevemos a muchas cosas porque son difíciles,
pero son difíciles porque no nos atrevemos a hacerlas" (Séneca)


Reply via email to