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
(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.
> 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
In response to
pgsql-hackers by date
|Next:||From: Christopher Kings-Lynne||Date: 2004-11-29 04:24:02|
|Subject: bug fix request|
|Previous:||From: Tom Lane||Date: 2004-11-29 03:58:43|
|Subject: Re: multiline CSV fields |