Re: AW: [HACKERS] Re: [GENERAL] users in Postgresql

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Zeugswetter Andreas SEV <ZeugswetterA(at)wien(dot)spardat(dot)at>, "'hackers(at)postgresql(dot)org'" <hackers(at)postgresql(dot)org>
Subject: Re: AW: [HACKERS] Re: [GENERAL] users in Postgresql
Date: 1999-11-11 21:33:08
Message-ID: Pine.LNX.4.20.9911112230211.442-100000@peter-e.yi.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 1999-11-11 21:36:26 Re: psql and \p\g
Previous Message Bryan Ingram 1999-11-11 21:26:35 syncing, replicating & crash recovery Q's