Re: [SQL] createdb -D xxxx not working - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [SQL] createdb -D xxxx not working
Date
Msg-id 4279.947603650@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
[hackers added to cc: list]

Peter Eisentraut <peter_e@gmx.net> writes:
> On 2000-01-08, Tom Lane mentioned:
>> Chris Griffin <cgriffin@websales.com> writes:
>>>> # setenv PGDATA2 /web/sites/1.192/db-data
>>>> # initlocation PGDATA2
>>>> # createdb -D PGDATA2
>> 
>> Surely you want $PGDATA2 in the latter two lines?

> You might recall me mentioning that the whole alternative location
> business doesn't work in the first place. I'll fix that this week; Chris
> will have to wait until the next release.

Fine.  BTW, am I the only one who thinks that it's really silly for
initlocation to expect to be given an unexpanded environment variable
name?  That's not normal practice (either elsewhere in Postgres, or
anywhere else that I know of).  It's confusing because it's not how
an ordinary Unix user would expect a shell command to behave, and it
doesn't buy any functionality that I can see.  I'd vote for taking
out the auto-expansion, so that the correct invocation becomesinitlocation $PGDATA2
which is what an average user would expect.

Actually, after looking at what initlocation really does, which is
darn near nothing, I wonder whether we shouldn't dispense with it
altogether...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Who fried this?
Next
From: Don Baccus
Date:
Subject: Re: [HACKERS] Simmultanous Connections (fwd)