Re: Generate user/group sysids from a sequence?

Поиск
Список
Период
Сортировка
От Ketrien Saihr-Kenchedra
Тема Re: Generate user/group sysids from a sequence?
Дата
Msg-id 1042829909.87969.9.camel@legacy.achedra.org
обсуждение исходный текст
Ответ на Re: Generate user/group sysids from a sequence?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, 2003-01-17 at 12:36, Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> >> This way, we don't need to bother with
> >> touching the sequence at all during a CREATE USER with explicit sysid.
> 
> > Well, the problem is that this could still cause the reuse of a deleted
> > user, no?  Wasn't that the problem we were originally trying to solve?
> 
> Hmm, yeah I guess so.  Okay, we do need to compare an explicit SYSID
> setting to the sequence, and bump up the sequence if it's greater.
> Annoying, but I guess there's no choice.

*puts on 'outside the box' hat*

I'm sure most of you are familiar with at least one flavor of Unix, so
I'm sure I'm not going to leave anyone confused. (I hope.) 

Why not maintain a sequence, but allow implicit UID assignment? ie;
CREATE USER user --UID1;
CREATE USER user2 WITH UID 2; --UID2
DROP USER user2 --buhbye;
CREATE user2 --Now gets UID3;
CREATE user3 WITH UID2 --user3 now has UID2;

Default behaviour being if a UID has -been- used (not is -in- use) that
it continues on?

-Ketrien Saihr-KenchedraI don't need no steeenking sig!http://ljpg.sf.net/ - http://www.blurty.com/~ketrien/



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Generate user/group sysids from a sequence?
Следующее
От: Greg Stark
Дата:
Сообщение: Suggestion for aggregate function