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
regards, tom lane