Re: Generate user/group sysids from a sequence?

Поиск
Список
Период
Сортировка
От Shridhar Daithankar
Тема Re: Generate user/group sysids from a sequence?
Дата
Msg-id 3E27F074.25728.54C12A9@localhost
обсуждение исходный текст
Ответ на Generate user/group sysids from a sequence?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Generate user/group sysids from a sequence?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 17 Jan 2003 at 1:16, Tom Lane wrote:

> 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).

I would say keep range of user specified ids and automatically generated ids 
exclusive to each other.

Something like user can specify the id upto 64K, automatically generated ids 
are above that.

Like unix ports. Below 1024, you need to be root to get it listening..

Of course one fine day, somebody is going to ask for a configuration option for 
this but a DBA can always set the sequence value to any range he wants.

Just a thought..

ByeShridhar

--
telepression, n.:    The deep-seated guilt which stems from knowing that you did 
not try    hard enough to look up the number on your own and instead put the    
burden on the directory assistant.        -- "Sniglets", Rich Hall & Friends



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Generate user/group sysids from a sequence?
Следующее
От: Mark Kirkwood
Дата:
Сообщение: Re: Oracle rant