Re: Getting consecutive sequence values

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Getting consecutive sequence values
Дата
Msg-id 10107.1049496026@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Getting consecutive sequence values  (Dave Smith <dave.smith@candata.com>)
Список pgsql-general
Dave Smith <dave.smith@candata.com> writes:
> I'm assuming that the setval would create an exclusive lock on the
> sequence until it is complete. Tom/Bruce?

But the setval() doesn't start to execute until some time after the
nextval() completes.  The window during which you're executing the
addition of 100 would easily allow some other process to perform a
nextval().  Mike's right, this doesn't work.

            regards, tom lane


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

Предыдущее
От: nolan@celery.tssi.com
Дата:
Сообщение: Re: dbmirror revisions
Следующее
От: nolan@celery.tssi.com
Дата:
Сообщение: Re: Getting consecutive sequence values