Re: [HACKERS] Development installation fails

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Development installation fails
Date: 1999-11-29 15:44:58
Message-ID: 16453.943890298@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <e99re41(at)csd(dot)uu(dot)se> writes:
> On Sun, 28 Nov 1999, Tom Lane wrote:
>> I'm not convinced your "which $0" implementation for finding BINDIR is
>> portable/reliable.

> To make a long story short, using the implementation I suggested with the
> checks you suggested would probably benefit 90% of our users.

And fail entirely for the other 10%? Not good enough if so :-( ... the
idea is to make install easier not harder. How much code would it take
to emulate as much of "which" as we need, do you think? What's our
fallback position if it doesn't work?

>> The other bit of environment state that initdb currently depends on is
>> USER.

> Yes, I noticed that too. Again, I really don't think that the script
> should set USER.

After thinking about it for a while, I think that there shouldn't be any
dependency on USER, period. initdb (and anything else that cares) ought
to get the name of the user they are executing as, and use that. I
can't see any good reason why the name inserted into the databases
should be potentially different from the ownership of the files.

Is 'whoami' a portable way of getting the current user id, or not?
The only reference I have about portable shell programming says that
the POSIX-approved command for this is 'id -u -n', and that 'whoami'
is a BSD-ism. I've got doubts that either one is universal ... we might
have to try both. Grumble.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-11-29 16:21:52 Re: [HACKERS] Re: BOUNCE pgsql-ports@postgreSQL.org: Non-member submission from[Joe Brenner <doom@kzsu.stanford.edu>] (fwd)
Previous Message Oleg Broytmann 1999-11-29 15:29:09 Re: [HACKERS] Re: [ADMIN] When postgres will be faster?