Re: [INTERFACES] Date: Sat, 26 Feb 2000 17:01:55 -0800
В списке pgsql-interfaces по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: [INTERFACES] Date: Sat, 26 Feb 2000 17:01:55 -0800 |
| Дата | |
| Msg-id | 22648.951616028@sss.pgh.pa.us обсуждение |
| Ответ на | ("Stephen Martin" <stephen@sealteam.demon.co.uk>) |
| Список | pgsql-interfaces |
"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
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера