Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1utovv-00EPfn-3K for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Sep 2025 14:58:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1utovt-009tkn-Pl for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Sep 2025 14:57:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1utovt-009tkc-HC for pgsql-bugs@lists.postgresql.org; Wed, 03 Sep 2025 14:57:57 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1utovq-000Msy-29 for pgsql-bugs@lists.postgresql.org; Wed, 03 Sep 2025 14:57:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 583Evrw0804477; Wed, 3 Sep 2025 10:57:53 -0400 From: Tom Lane To: Matthias =?utf-8?Q?H=C3=B6rmann?= cc: Daniel Gustafsson , 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: References: <19042-347869ae37c993f4@postgresql.org> <144DDCC5-8EB1-4AA2-91FB-36916898A86F@yesql.se> Comments: In-reply-to Matthias =?utf-8?Q?H=C3=B6rmann?= message dated "Wed, 03 Sep 2025 13:48:38 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <804475.1756911473.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 03 Sep 2025 10:57:53 -0400 Message-ID: <804476.1756911473@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Matthias =3D?utf-8?Q?H=3DC3=3DB6rmann?=3D writes: > The 2025-09-03 13:45:15, Daniel Gustafsson wrote: >> This is the intended behaviour, --help (and --version) is parsed specia= lly 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