Re: AW: \c connects as another user instead I want in psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
Cc: Kovacs Zoltan <kovacsz(at)pc10(dot)radnoti-szeged(dot)sulinet(dot)hu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: AW: \c connects as another user instead I want in psql
Date: 2001-05-03 13:51:16
Message-ID: 24093.988897876@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> writes:
> The usesysid was originally intended to map pg users to unix accounts.
> I do not see why it should not be possible to map different pg users
> to a single unix account. The above imho stems from an improper use of this
> column which needs to be fixed, not the column made unique.

No. I'm not sure whether or not I believe the comment about Unix
accounts; Postgres does not care about Unix accounts, and never has
to my knowledge. But it has always used the usesysid as owner
identification for database objects (tables etc). If two different
users have the same usesysid then they are both the owner of these
objects; moreover they are interchangeable for permissions checks, too.
This is not a situation that has any practical use AFAICS.

There has been some talk of eliminating usesysid entirely in favor of
using the OID of the pg_shadow entry as the user's ID for ownership
identification. If that happens, we'd want a unique index on OID
instead.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-05-03 14:02:09 Re: \c connects as another user instead I want in psql
Previous Message Zeugswetter Andreas SB 2001-05-03 13:38:57 AW: \c connects as another user instead I want in psql