Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] Date: Sat, 26 Feb 2000 17:01:55 -0800

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Stephen Martin" <stephen(at)sealteam(dot)demon(dot)co(dot)uk>
Cc: pgsql-interfaces(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Date: Sat, 26 Feb 2000 17:01:55 -0800
Date: 2000-02-27 01:47:08
Message-ID: 22648.951616028@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
"Stephen Martin" <stephen(at)sealteam(dot)demon(dot)co(dot)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

In response to

  • at 2000-02-27 01:01:55 from Stephen Martin

pgsql-hackers by date

Next:From: Tom LaneDate: 2000-02-27 04:48:49
Subject: update_pg_pwd trigger does not work very well
Previous:From: Stephen MartinDate: 2000-02-27 01:15:34
Subject: RE: [INTERFACES] Date: Sat, 26 Feb 2000 17:01:55 -0800

pgsql-interfaces by date

Next:From: Willy De la CourtDate: 2000-02-27 14:16:37
Subject: pgsql ODBC driver and Visual Foxpro
Previous:From: Stephen MartinDate: 2000-02-27 01:15:34
Subject: RE: [INTERFACES] Date: Sat, 26 Feb 2000 17:01:55 -0800

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group