Re: [HACKERS] \c connects as another user instead I want in psql

2001-05-07 Thread Tom Lane
>>> Really? We are removing usesysid? Seems the admin will no longer be >>> able to choose the users id, right? >> >> Not that this was ever useful. > Except for re-adding users. Yes. In theory, the correct answer to that is to add referential integrity checks that prevent you from dropp

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

2001-05-03 Thread Ian Lance Taylor
Tom Lane <[EMAIL PROTECTED]> writes: > 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 t

Re: [HACKERS] \c connects as another user instead I want in psql

2001-05-03 Thread Bruce Momjian
> Kovacs Zoltan <[EMAIL PROTECTED]> writes: > >> Is it possible that 1060 and 1092 have the same usesysid in pg_shadow? > > > Hmmm. That was the problem. Thanks! By the way, could you please define a > > unique constraint on column 'usesysid' in future in PostgreSQL? > > Yup, there should be one

Re: [HACKERS] \c connects as another user instead I want in psql

2001-05-03 Thread Peter Eisentraut
Bruce Momjian writes: > Really? We are removing usesysid? Seems the admin will no longer be > able to choose the users id, right? Not that this was ever useful. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)

Re: [HACKERS] \c connects as another user instead I want in psql

2001-05-03 Thread Bruce Momjian
> Kovacs Zoltan writes: > > > By the way, could you please define a unique constraint on column > > 'usesysid' in future in PostgreSQL? > > The usesysid column will be removed and the oid column will be used > instead. That one tends to be unique, but an index will still be added. Really? We

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

2001-05-03 Thread Tom Lane
Zeugswetter Andreas SB <[EMAIL PROTECTED]> 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

Re: [HACKERS] \c connects as another user instead I want in psql

2001-05-03 Thread Peter Eisentraut
Kovacs Zoltan writes: > By the way, could you please define a unique constraint on column > 'usesysid' in future in PostgreSQL? The usesysid column will be removed and the oid column will be used instead. That one tends to be unique, but an index will still be added. -- Peter Eisentraut [EM

AW: [HACKERS] \c connects as another user instead I want in psql

2001-05-03 Thread Zeugswetter Andreas SB
> >> Is it possible that 1060 and 1092 have the same usesysid > in pg_shadow? > > > Hmmm. That was the problem. Thanks! By the way, could you > please define a > > unique constraint on column 'usesysid' in future in PostgreSQL? > > Yup, there should be one (and one on usename, too). Not sure

Re: [HACKERS] \c connects as another user instead I want in psql

2001-05-03 Thread Tom Lane
Kovacs Zoltan <[EMAIL PROTECTED]> writes: >> Is it possible that 1060 and 1092 have the same usesysid in pg_shadow? > Hmmm. That was the problem. Thanks! By the way, could you please define a > unique constraint on column 'usesysid' in future in PostgreSQL? Yup, there should be one (and one on u

Re: [HACKERS] \c connects as another user instead I want in psql

2001-05-03 Thread Kovacs Zoltan
On Wed, 2 May 2001, Tom Lane wrote: > Kovacs Zoltan <[EMAIL PROTECTED]> writes: > > tir=> \c - 1060 > > You are now connected as new user 1060. > > tir=> select user; > > current_user > > -- > > 1092 > > (1 row) > > Is it possible that 1060 and 1092 have the same usesysid in pg_sha

Re: [HACKERS] \c connects as another user instead I want in psql

2001-05-02 Thread Tom Lane
Kovacs Zoltan <[EMAIL PROTECTED]> writes: > tir=> \c - 1060 > You are now connected as new user 1060. > tir=> select user; > current_user > -- > 1092 > (1 row) Is it possible that 1060 and 1092 have the same usesysid in pg_shadow? regards, tom lane

[HACKERS] \c connects as another user instead I want in psql

2001-05-02 Thread Kovacs Zoltan
This may be a reported bug. 7.1beta4. I use user names mostly as numbers. E.g. 1050, 1060, 1092. Sometimes I got strange result when I try to reconnect: tir=> \c - 1022 You are now connected as new user 1022. tir=> select user; current_user -- 1022 (1 row) (It's OK.) tir=> \c - 1