Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yvc6I-0005Lf-Oo for pgsql-bugs@arkaria.postgresql.org; Fri, 22 May 2015 01:50:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yvc6I-0005DG-4G for pgsql-bugs@arkaria.postgresql.org; Fri, 22 May 2015 01:50:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yvc6H-0005CD-17 for pgsql-bugs@postgresql.org; Fri, 22 May 2015 01:50:13 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Yvc6E-0003fg-6r for pgsql-bugs@postgresql.org; Fri, 22 May 2015 01:50:11 +0000 Received: from intern.anarazel.de (unknown [184.23.178.130]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id F1BFD860001; Fri, 22 May 2015 03:50:08 +0200 (CEST) Date: Fri, 22 May 2015 03:50:06 +0200 From: Andres Freund To: Tom Lane Cc: Alvaro Herrera , Michael Paquier , "D. S." , pgsql-bugs@postgresql.org Subject: Re: unrecognized option '--help Message-ID: <20150522015006.GF2028@alap3.anarazel.de> References: <1432193703.4099.3.camel@skuggor.se> <20150522013619.GQ5885@postgresql.org> <20213.1432259076@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20213.1432259076@sss.pgh.pa.us> X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2015-05-21 21:44:36 -0400, Tom Lane wrote: > Alvaro Herrera writes: > > Michael Paquier wrote: > >> It is wanted this way for all the utilities of src/bin. See > >> handle_help_version_opts() in src/bin/scripts/common.c for your case. > > > Is it really wanted? I find it very annoying and wish it didn't do > > that. > > I think the only thing that would do what you wanted would be to > recognize *any* argv element matching "--help" as a help request. > Maybe that's all right, but I'm a tad worried about the possibility > of false positives. Are we so sure that that string could never be > a database name, table name, etc? I'm not following. Why does checking for --help/-? in the normal getopt_long call require that? In many, but not all, utilities only argv[1] is checked... Andres -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs