Re: Generate user/group sysids from a sequence?

From: "Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Generate user/group sysids from a sequence?
Date: 2003-01-17 06:30:52
Message-ID: 3E27F074.25728.54C12A9@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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..

Bye
Shridhar

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Kirkwood 2003-01-17 07:11:41 Re: Oracle rant
Previous Message Tom Lane 2003-01-17 06:16:40 Generate user/group sysids from a sequence?