Re: DOCS - Server Applications [option] should be [option...]

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: DOCS - Server Applications [option] should be [option...]
Date: 2026-02-18 21:32:29
Message-ID: aba34849-c1c8-4385-a87e-09ccda58f91e@proxel.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/18/26 10:05 AM, Peter Smith wrote:
> On Wed, Feb 18, 2026 at 7:32 PM Andreas Karlsson <andreas(at)proxel(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2026-02-18 21:50:32 Re: add assertion for palloc in signal handlers
Previous Message Andreas Karlsson 2026-02-18 21:29:14 Re: DOCS - System Applications 'datadir' parameter