pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Matthias Hörmann <matthias.hoermann@saltation.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19042: Option --help not recognized at the end of command line in pg_restore
Date: Mon, 27 Oct 2025 09:30:36 -0500
Message-ID: <aP-CDMJc5aQ0dDWk@nathan> (raw)
In-Reply-To: <B8FA8D64-5575-41F1-9F3B-DF603495309A@yesql.se>
References: <19042-347869ae37c993f4@postgresql.org>
	<144DDCC5-8EB1-4AA2-91FB-36916898A86F@yesql.se>
	<aLgrFiwZcwCw1giD@saltation.com>
	<804476.1756911473@sss.pgh.pa.us>
	<53lkszuko3qwk4sn6mxz5dl6yahkosrksm3pcxjikcuxj3vssq@jwzipa3ikold>
	<513f6b2f-e6be-423d-aad6-4ab58988278b@eisentraut.org>
	<C3707C55-9C54-47FB-90FB-E47A36F7D721@yesql.se>
	<aPlLZR_7tTa7WxOg@nathan>
	<B8FA8D64-5575-41F1-9F3B-DF603495309A@yesql.se>

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





view thread (20+ messages)  latest in thread

Message-ID: <aP-CDMJc5aQ0dDWk@nathan>
Permalink:  ../aP-CDMJc5aQ0dDWk@nathan/
Also on:    postgresql.org/message-id/aP-CDMJc5aQ0dDWk@nathan

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: nathandbossart@gmail.com, daniel@yesql.se, peter@eisentraut.org, andres@anarazel.de, tgl@sss.pgh.pa.us, matthias.hoermann@saltation.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #19042: Option --help not recognized at the end of command line in pg_restore
  In-Reply-To: <aP-CDMJc5aQ0dDWk@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox