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

From Nathan Bossart
Subject Re: BUG #19042: Option --help not recognized at the end of command line in pg_restore
Date
Msg-id aP-CDMJc5aQ0dDWk@nathan
Whole thread Raw
In response to Re: BUG #19042: Option --help not recognized at the end of command line in pg_restore  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: BUG #19042: Option --help not recognized at the end of command line in pg_restore
List pgsql-bugs
On Sat, Oct 25, 2025 at 12:26:01AM +0200, Daniel Gustafsson wrote:
> While hacking on this it seemed like a good idea to move to using progname
> consistently, and reduce scope in some places from global variables, but
> looking at it now I'm less convinced.  At the very least it should be ripped
> out into its own patch but for now those changes are left in there.

Yeah, that does feel like it ought to be its own patch.  After a
read-through, 0001 looks like the right idea to me, though.  It's a larger
patch, but the majority of the changes are pretty mechanical.

+/* port/pg_option_utils.c */
+extern bool is_help_param(int argc, char *argv[], int optind);

And fe_utils/option_utils.c, right (since it has a copy of this function)?
Or is the idea to use pg_option_utils.c for both the frontend and the
backend?

> It's far from an exciting patchset but it would be nice to get it done once and
> for all.  0002 is a small change to make sure all apps exit with the same code,
> I was unable to find a documented rationale for exit(2) so I think it's an
> oversight.

0002 LGTM

-- 
nathan



pgsql-bugs by date:

Previous
From: Lori Corbani
Date:
Subject: RE: [EXTERNAL]Re: BUG #19094: select statement on postgres 17 vs postgres 18 is returning different/duplicate results
Next
From: Lori Corbani
Date:
Subject: RE: [EXTERNAL]Re: BUG #19094: select statement on postgres 17 vs postgres 18 is returning different/duplicate results