Re: -V, --version -- deprecated? - Mailing list pgsql-hackers

From Neil Conway
Subject Re: -V, --version -- deprecated?
Date
Msg-id 1101701215.22124.27.camel@localhost.localdomain
Whole thread Raw
In response to Re: -V, --version -- deprecated?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Wed, 2004-11-24 at 20:25 -0500, Bruce Momjian wrote:
> FreeBSD had a problem with double-dash args but I thought that related
> to getopt, and I can't remember how that fits in.  Maybe we defined '-'
> in getopt and said it took an argument and tested for '-help' and
> '-verbose', but now we just check argv right inside main.  I can't
> remember totally.

ISTM that port/getopt_long.c ought to allow long options to work even if
the platform doesn't provide a getopt_long() itself.

BTW, pg_dump's "-X ..." options seem weird. Why is the "-X" prefix
necessary? ISTM pg_dump would be more consistent with standard
command-line tools if we just provided the long options (such as
--disable-triggers and so on) and did away with the "-X" prefixes.

I'd like to propose these changes:

(1) remove documentation for "-V", declare it deprecated. I don't see
any reason to actually remove it, but this should at least make the
current status quo more consistent.

(2) add documentation for "--help" and "--version" flags, where
appropriate

(3) remove documentation for pg_dump's "-X ..." flags, just document the
--long-option variant. Again, I don't see a need to remove support for
the -X options, but we should declare them deprecated.

Comments?

> Agreed.  psql --help certainly looks inconsistent --- only --help and
> --version are long.

Well, perhaps, but I don't think that's a problem (there is no reason
that _every_ command-line flag needs to have both long and short
options).

-Neil




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: multiline CSV fields
Next
From: Christopher Kings-Lynne
Date:
Subject: bug fix request