Re: Postgres and --config-file option - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Postgres and --config-file option
Date
Msg-id 0ffab2f8-496b-463c-88f4-f9ca05fb5371@eisentraut.org
Whole thread Raw
In response to Re: Postgres and --config-file option  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Postgres and --config-file option
List pgsql-hackers
On 02.02.24 22:27, David G. Johnston wrote:
> On Fri, Feb 2, 2024 at 2:23 PM David G. Johnston 
> <david.g.johnston@gmail.com <mailto:david.g.johnston@gmail.com>> wrote:
> 
>     On Mon, Jan 15, 2024 at 4:35 AM Aleksander Alekseev
>     <aleksander@timescale.com <mailto:aleksander@timescale.com>> wrote:
> 
>         PFA the patch. It's short but I think it mitigates the problem.
> 
> 
>     I took a look at where these options are discussed in the
>     documentation and now feel that we should make these options clear
>     more broadly (config and libpq, plus pointing to --name from -c in a
>     couple of places).  It doesn't add much verbosity and, frankly, if I
>     was to pick one "--name=value" would win and so I'd rather document
>     it, leaving -c alone for historical reasons.
> 
>     I've attached a replacement patch with the additional changes.
> 
> 
> And I just saw one more apparently undocumented requirement (or a typo)
> 
> You must specify the --config-file
> 
> The actual parameter is "config_file", so apparently we are supposed to 
> either convert underscores to hyphens or we have a typo.

We convert '-' to '_' when parsing long options (see ParseLongOption() 
in guc.c).  So writing the long options with hyphens should generally be 
preferred in documentation.




pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Why is subscription/t/031_column_list.pl failing so much?
Next
From: Alvaro Herrera
Date:
Subject: Re: Popcount optimization using AVX512