Re: [HACKERS] Re: initdb.sh fixed - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] Re: initdb.sh fixed
Date
Msg-id Pine.GSO.4.02A.9912242228200.11069-100000@Hamster.DoCS.UU.SE
Whole thread Raw
In response to Re: [HACKERS] Re: initdb.sh fixed  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Sun, 19 Dec 1999, Bruce Momjian wrote:

> > Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > > We could argue that Postgres is the super-user for the database, it
> > > should be zero userid.
> > 
> > Actually, that's quite a good thought --- is there *any* real need
> > for initdb to extract the UID of the postgres user?  What we do need,
> > I think, is the *name* of the postgres user, which we might perhaps
> > get with something like
> > 
> >     whoami 2>/dev/null || id -u -n 2>/dev/null || echo postgres
> 
> We currently have:
> 
>   EffectiveUser=`id -n -u 2> /dev/null` || EffectiveUser=`whoami 2> /dev/null`
> 

If neither one of these resulted in anything it will ask you to provide a
string with --username. But I figure one must have one of those.

-- 
Peter Eisentraut                  Sernanders vaeg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: [HACKERS] Source code format votes
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Re: initdb.sh fixed7