pg.ddx.io pgsql-interfaces@postgresql.org mailing list archivehelp / color / mirror / Atom feed
RE: [INTERFACES] Date: Sat, 26 Feb 2000 17:01:55 -0800 2+ messages / 2 participants [nested] [flat]
* RE: [INTERFACES] Date: Sat, 26 Feb 2000 17:01:55 -0800 @ 2000-02-27 01:15 Stephen Martin <stephen@sealteam.demon.co.uk> 1 sibling, 0 replies; 2+ messages in thread From: Stephen Martin @ 2000-02-27 01:15 UTC (permalink / raw) To: pgsql-interfaces Hello, as a post script to this.. Under normal circumstances one cannot add another user of the same name (phew!:) ) I think this was the result of a setup script writing directly into pg_shadow and pg_user; Stephen ---------------------------------------------- 010000C9 -----Original Message----- From: owner-pgsql-interfaces@postgreSQL.org [mailto:owner-pgsql-interfaces@postgreSQL.org]On Behalf Of Stephen Martin Sent: Saturday, February 26, 2000 5:00 PM To: pgsql-interfaces@postgreSQL.org Subject: [INTERFACES] Date: Sat, 26 Feb 2000 17:01:55 -0800 Hello, How can one differential between apparently duplicated usernames? For example I have a postgres id 'www' present within my pg_shadow/pg_user. I recently installed a package and inadvertantly created another 'www' user. I have managed to remove the duplicate user by deleting it from pg_shadow by identifying it via its usesysid field. How can I 1) Ensure I canot in future create duplicate names? 2) If duplicate users are possible by what other means can the various instances of them be referenced? Stephen ---------------------------------------------- 010000C9 ************ ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [INTERFACES] Date: Sat, 26 Feb 2000 17:01:55 -0800 @ 2000-02-27 01:47 Tom Lane <tgl@sss.pgh.pa.us> 1 sibling, 0 replies; 2+ messages in thread From: Tom Lane @ 2000-02-27 01:47 UTC (permalink / raw) To: Stephen Martin <stephen@sealteam.demon.co.uk>; +Cc: pgsql-interfaces; pgsql-hackers@postgreSQL.org "Stephen Martin" <stephen@sealteam.demon.co.uk> writes: > For example I have a postgres id 'www' present within my pg_shadow/pg_user. > I recently installed a package and inadvertantly created another 'www' user. > How can I > 1) Ensure I canot in future create duplicate names? There should probably be a unique index on pg_shadow's usename field, and another one on the usesysid field (otherwise there's not a unique map from sysids to users, which is bad since we use sysids as referential keys in other tables). I'm surprised this hasn't been pointed out before :-( I'm not sure how difficult it would be to do it. Just creating an index with CREATE INDEX will not work, because pg_shadow is an installation-wide table and its index must be as well. There's some routine somewhere in the backend that would have to be taught about the index. regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-02-27 01:47 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2000-02-27 01:15 ` Stephen Martin <stephen@sealteam.demon.co.uk> 2000-02-27 01:47 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox