From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matthias Hörmann <matthias.hoermann@saltation.com>
Cc: Daniel Gustafsson <daniel@yesql.se>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19042: Option --help not recognized at the end of command line in pg_restore
Date: Wed, 03 Sep 2025 10:57:53 -0400
Message-ID: <804476.1756911473@sss.pgh.pa.us> (raw)
In-Reply-To: <aLgrFiwZcwCw1giD@saltation.com>
References: <19042-347869ae37c993f4@postgresql.org>
<144DDCC5-8EB1-4AA2-91FB-36916898A86F@yesql.se>
<aLgrFiwZcwCw1giD@saltation.com>
Matthias =?utf-8?Q?H=C3=B6rmann?= <matthias.hoermann@saltation.com> writes:
> The 2025-09-03 13:45:15, Daniel Gustafsson wrote:
>> This is the intended behaviour, --help (and --version) is parsed specially and
>> must be the first parameter. We do this for all command line utilities.
> Well, the use-case that comes up quite often for me (for any commands,
> not just postgres) is that I add parameters I know or remember from my
> last look at --help and then want to check again what else to add, for
> that it is useful to be able to use --help as the last parameter.
FWIW, I agree with this. While I don't try to do that with PG
utilities (since I know it doesn't work), I frequently rely on that
behavior of our configure script. I'd be in favor of recognizing
--help (though probably not -?) in any argument position. Less sure
about --version.
regards, tom lane
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: tgl@sss.pgh.pa.us, matthias.hoermann@saltation.com, daniel@yesql.se, 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: <804476.1756911473@sss.pgh.pa.us>
* 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