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

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Matthias Hörmann <matthias(dot)hoermann(at)saltation(dot)com>, 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-03 19:09:00
Message-ID: 365ACB7B-B731-4F66-B69B-1765194A5B58@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> On 3 Sep 2025, at 16:57, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Matthias =?utf-8?Q?H=C3=B6rmann?= <matthias(dot)hoermann(at)saltation(dot)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.

Same here, it's a totally reasonable ask.

> I'd be in favor of recognizing
> --help (though probably not -?) in any argument position.

Any particular reason to restrict -? from this?

> Less sure about --version.

Agreed, I think --version should require being the sole parameter.

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-09-03 19:22:30 Re: BUG #19042: Option --help not recognized at the end of command line in pg_restore
Previous Message Álvaro Herrera 2025-09-03 17:06:02 Re: BUG #18960: Mistake in test test_simple_pipeline (libpq_pipeline.c)