Re: why was the VAR 'optind' never changed in initdb? - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: why was the VAR 'optind' never changed in initdb?
Date
Msg-id 4F832A1A.1020802@dunslane.net
Whole thread Raw
In response to Re: why was the VAR 'optind' never changed in initdb?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

On 04/09/2012 01:38 PM, Tom Lane wrote:
> Andrew Dunstan<andrew@dunslane.net>  writes:
>> i.e. we'd forbid:
>>       initdb -D foo bar
>> which the OP's error more or less devolves to.
> Makes sense.  Don't we have a similar issue with psql, pg_dump, etc?

From a quick survey:

psql won't override a dbname or username set explicitly with an option 
argument.

pg_dump doesn't have an option argument to set the dbname.

pg_restore doesn't have an option argument to set the input file name.

vacuumdb, clusterdb, reindexdb, createlang and droplang all need 
remediation. createuser and dropuser look ok.

pg_ctl seems a mess :-( I'll need to look at it closer.


cheers

andrew




>             regards, tom lane
>


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: bug in fast-path locking
Next
From: Merlin Moncure
Date:
Subject: Re: Regarding column reordering project for GSoc 2012