Generate user/group sysids from a sequence?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Generate user/group sysids from a sequence?
Дата
Msg-id 5059.1042784200@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Generate user/group sysids from a sequence?  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
Re: Generate user/group sysids from a sequence?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Currently, the default sysid assigned to a user or group is computed as
"max(sysid)+1".  We've seen a couple of complaints now from people who
deleted their newest user, made another user, and found that permissions
from the deleted user carried over to the new one.

It seems to me that the easiest solution to this is to generate the
default sysid from a sequence object, instead.  Unless someone
deliberately resets the sequence, there'd be no conflicts.

A small difficulty is that explicitly-specified sysids could conflict
with sysids generated later by the sequence.  We could perhaps fix this
by forcing up the sequence setting to be at least as large as an
explicitly-given ID (compare the handling of explicitly loaded OIDs).

Comments?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Justin Clift
Дата:
Сообщение: Can we revisit the thought of PostgreSQL 7.2.4?
Следующее
От: "Shridhar Daithankar"
Дата:
Сообщение: Re: Generate user/group sysids from a sequence?