Re: AW: [HACKERS] Re: [GENERAL] users in Postgresql - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: AW: [HACKERS] Re: [GENERAL] users in Postgresql
Date
Msg-id Pine.LNX.4.20.9911112230211.442-100000@peter-e.yi.org
Whole thread Raw
In response to Re: AW: [HACKERS] Re: [GENERAL] users in Postgresql  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: AW: [HACKERS] Re: [GENERAL] users in Postgresql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 1999-11-10, Tom Lane mentioned:

> AFAIK it's not *essential* to make Postgres and Unix UIDs the same
> ... but I think it is convenient to do so from an admin standpoint.
> (One less set of numbers to keep track of, and one fewer way to get
> confused about who is who.)  I would not like to see you remove a
> feature that makes it easy to do that.
> 
> Of course there's no value in it if you are running a setup in which
> not all the Postgres users have Unix-system accounts.  But that doesn't
> mean there is no value in it for installations where there is such a
> correspondence.

Excuse my ignorance once again, but

1) Why bother about those sysids at all? To the end user/administrator they
have about the same informational value as the oid of the float4 type. As
long as you always write "float4" or "username" you don't have to bother.

2) The mere fact of mentioning or even prompting for these ids confuses users.

3) If you really "keep track" of user ids (Unix or PostgreSQL) you really don't
have enough users or a really superior brain.

4) The purpose of the wrapper scripts was to provide "wrappers" around the
various SQL commands. If you do something in the scripts that you can't do in
"SQL" then we'll never stop having these confused users that at one point
almost caused us to remove the scripts altogether.

5) How exactly are you supposed to set the uid? The behaviour of
INSERT INTO pg_shadow VALUES (...);
and
UPDATE pg_shadow SET usesysid = ...;
is non-deterministic at best, unfortunately. The proper fix (ignoring the first
4 points above) would be to provide an extension to CREATE/ALTER USER, and
*then* we can extend the scripts that way.

I seems to me that the scripts were written before there even was a CREATE USER
command and then the functionality was just carried over without much
contemplation.

Well, okay, everyone that wants to set their PostgreSQL user id
explicitly, send me a note and I'll put it back in, which ever way.

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



pgsql-hackers by date:

Previous
From: Bryan Ingram
Date:
Subject: syncing, replicating & crash recovery Q's
Next
From: Peter Eisentraut
Date:
Subject: Re: psql and \p\g