Re: BUG #19042: Option --help not recognized at the end of command line in pg_restore

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Matthias Hörmann <matthias(dot)hoermann(at)saltation(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19042: Option --help not recognized at the end of command line in pg_restore
Date: 2025-09-10 05:26:10
Message-ID: 513f6b2f-e6be-423d-aad6-4ab58988278b@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 03.09.25 21:34, Andres Freund wrote:
> So +many for recognizing --help (and I'd say -?) everywhere, not just as the
> first argument. I never understood why we don't do that.

I think in the olden days we didn't have universal getopt_long()
support, so it was hardcoded. I don't see a problem with changing it.

> I don't think the argument for --version is particularly strong from a
> usability perspective, but I don't see what we gain from parsing --version/-V
> differently than we do all the other arguments. It seems best to just handle
> --version the same as all the other arguments.

Right. If you try the usual GNU utilities, they handle --help and
--version at any argument position.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2025-09-10 07:14:35 BUG #19046: Incorrect result when using json_array() with column reference in subquery combined with RIGHT JOIN
Previous Message feichanghong 2025-09-10 02:32:00 Re: BUG #19040: Memory leak in hashed subplan node due to missing hashtempcxt reset