Re: more adequate usage msg: pg_controldata.diff - Mailing list pgsql-patches

From Tom Lane
Subject Re: more adequate usage msg: pg_controldata.diff
Date
Msg-id 15822.1042149983@sss.pgh.pa.us
Whole thread Raw
In response to Re: more adequate usage msg: pg_controldata.diff  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: more adequate usage msg: pg_controldata.diff  (Serguei Mokhov <mokhov@cs.concordia.ca>)
List pgsql-patches
Peter Eisentraut <peter_e@gmx.net> writes:
> Bruce Momjian writes:
>> Patch applied, with slight adjustment.  New output is:

> I explained in my last message that this patch is wrong.  Please revert
> it.  (DATADIR is not an option and therefore it shouldn't be listed in the
> options list.)

Actually, it is optional for pg_controldata.  The usage message is
technically correct as it stands because pg_controldata accepts at most
one argument (either --help, --version, or a DATADIR name).

At some point in the future we might alter the program so that it can
take some switches as well as a DATADIR name, and at that time the
distinction between switches and DATADIR would become significant.
But as of today, a usage message like
        pg_controldata [options] [DATADIR]
would actually be wrong, so I'm not sure what to put instead.

I agree with Peter's objection in principle, but given that the program
has such a limited commandline syntax, I can't find a hard reason to do
otherwise than Bruce did.

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Docs for service file
Next
From: Peter Eisentraut
Date:
Subject: Re: more adequate usage msg: pg_controldata.diff