Re race condition and currval

Поиск
Список
Период
Сортировка
От K Parker
Тема Re race condition and currval
Дата
Msg-id DDLEBFCNBOGOAAAA@shared1-mail.whowhere.com
обсуждение исходный текст
Список pgsql-general
> Is currval defined by the session or the current state of the sequence?

It's defined by the backend session.  Each connection handles its own value of currval() completely separate from the
others. When the sequence value is advanced (via a call to nextval()) the backend stores that value so it can respond
toany queries using currval(). The internal call to nextval() is completely outside  any transaction, and the sequence
numberis _never_ rolled back even if the to-be-added row's transaction is rolled back. 



Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com

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

Предыдущее
От: "Darrin Ladd"
Дата:
Сообщение: Re: Removing all NOT NULL constraints from multiple tables easily
Следующее
От: Tim Kientzle
Дата:
Сообщение: Re: PostgreSQL General Digest V1 #569