Re: List last value of all sequences

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: List last value of all sequences
Дата
Msg-id 20030724124940.B4080-100000@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: List last value of all sequences  (greg@turnstep.com)
Ответы Re: List last value of all sequences  (greg@turnstep.com)
Список pgsql-general
On Thu, 24 Jul 2003 greg@turnstep.com wrote:

> > The main problem with this approach is that, while you get the "current
> > value", the sequence is incremented by the call. I just want to
> > (strictly) look at the value.
>
> The sequence values do not change: test it for yourself.

I'm not sure, but if another transaction wanted to do a nextval at "the
same time" couldn't the sequence of events end up going something like:

T1: nextval
T2: nextval
T1: setval(currval-1)

which would do the wrong thing since the next nextval would give the same
value that T2 already got?



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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Postgres unique index checking and atomic transactions
Следующее
От: Ron Johnson
Дата:
Сообщение: Re: SAP DB: The unsung Open Source DB