Re: DOCS - Server Applications [option] should be [option...] - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: DOCS - Server Applications [option] should be [option...]
Date
Msg-id aba34849-c1c8-4385-a87e-09ccda58f91e@proxel.se
Whole thread Raw
In response to Re: DOCS - Server Applications [option] should be [option...]  (Peter Smith <smithpb2250@gmail.com>)
Responses Re: DOCS - Server Applications [option] should be [option...]
List pgsql-hackers
On 2/18/26 10:05 AM, Peter Smith wrote:
> On Wed, Feb 18, 2026 at 7:32 PM Andreas Karlsson <andreas@proxel.se> wrote:
>> I am not sure that is an improvement. I would rather move things with
>> less signal towards the end. Also how many examples have we of each?
>> Most seem to be on the format below which I feel indicates [option...]
>> is last (but before order dependent arguments like dbname.)
>>
>>     pg_dump [connection-option...] [option...] [dbname]
>>
> 
> Thanks for the feedback
> 
> The scope of my patch is only the Server Applications [1]. Maybe it is
> still correct that it is not much of an improvement, but you are
> citing examples from Client Applications.
Ah, now I see why it is put first in many of the commands. It is to 
allow writing the following:

    initdb [option...] [ --pgdata | -D ] directory

So I guess I will have to change my mind and say that putting it first 
is the least bad option.

Side note: that looks like a bug, shouldn't it be the below?

    initdb [option...] [[ --pgdata | -D ] directory]

Andreas




pgsql-hackers by date:

Previous
From: Andreas Karlsson
Date:
Subject: Re: DOCS - System Applications 'datadir' parameter
Next
From: Andres Freund
Date:
Subject: Re: add assertion for palloc in signal handlers