Darn, long option emulation doesn't work on FreeBSD

Started by Peter Eisentrautabout 25 years ago2 messages
#1Peter Eisentraut
peter_e@gmx.net

The long option emulation getopt(argc, argv, "...xy:-:") doesn't work on
FreeBSD (and who knows where else), it throws away options of the form
'--foo'. That means you cannot specify postmaster options like
--log-pids, etc. on the command line. Also, the --version option doesn't
work, which may cause initdb to fail for you.

So apparently we'll have to use an actual option letter for passing
runtime configuration parameters. Any suggestions? Already in use are

a A b B C d D e E f F i l L m M n N o O p P Q s S t v W x

'V' will be used as short form for "version". My early favourite is '-c'.
(Using non-letters is probably not portable either.)

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/

#2Dominic J. Eidson
sauron@the-infinite.org
In reply to: Peter Eisentraut (#1)
Re: Darn, long option emulation doesn't work on FreeBSD

On Mon, 6 Nov 2000, Peter Eisentraut wrote:

So apparently we'll have to use an actual option letter for passing
runtime configuration parameters. Any suggestions? Already in use are

a A b B C d D e E f F i l L m M n N o O p P Q s S t v W x

Q is not used (or broken):

morannon:~>postmaster -Q
postmaster: invalid option -- Q
Try -? for help.
morannon:~>postgres -Q
postgres: invalid option -- Q
Usage: postgres [options] [dbname]

... snip ...

--
Dominic J. Eidson
"Baruk Khazad! Khazad ai-menu!" - Gimli
-------------------------------------------------------------------------------
http://www.the-infinite.org/ http://www.the-infinite.org/~dominic/