Re: Generate user/group sysids from a sequence?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Generate user/group sysids from a sequence?
Дата
Msg-id 12804.1042822861@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Generate user/group sysids from a sequence?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Generate user/group sysids from a sequence?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> OK.  Do we have many people left upgrading from pg_dump's that COPY into
> pg_shadow?

Hm, good point.  I had forgotten we ever did that ;-)

It looks like 7.0.* was the last release where pg_dumpall did that.
Is that far enough back?

[ looks further... ]  Actually, such a dump is broken now anyway,
because the column layout of pg_shadow has changed since 7.0.
So I think it's a moot point.

We could perhaps arrange the code so that if nextval'ing the sequence
produces a duplicate sysid, we just loop back and nextval again until
we get a nonconflicting id.  I had hoped to remove the seqscan of
pg_shadow from CREATE USER; but we could replace it with syscache probes
for duplicate usename and id, and just repeat the syscache probe if
we have to do another nextval.  This way, we don't need to bother with
touching the sequence at all during a CREATE USER with explicit sysid.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Generate user/group sysids from a sequence?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Win32 port