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

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, Matthias Hörmann <matthias.hoermann@saltation.com>, pgsql-bugs@lists.postgresql.org
Date: 2025-09-10T09:24:36Z
Lists: pgsql-bugs
> On 10 Sep 2025, at 07:26, Peter Eisentraut <peter@eisentraut.org> wrote:
> 
> 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.

That's probably an accurate description.  I am writing up a patch to move it
into long option processing to see what it would look like, will share soon.

--
Daniel Gustafsson