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

From Bruce Momjian
Subject Re: [HACKERS] Re: initdb.sh fixed
Date
Msg-id 199912200440.XAA25315@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re: initdb.sh fixed  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Re: initdb.sh fixed
Re: [HACKERS] Re: initdb.sh fixed
List pgsql-hackers
> 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`

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: initdb.sh fixed
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: initdb.sh fixed