Re: Last inserted id

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Last inserted id
Дата
Msg-id 19554.1005600712@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Last inserted id  ("Simeo Reig" <simreig@terra.es>)
Список pgsql-odbc
"Simeo Reig" <simreig@terra.es> writes:
>> False.  Option B is multi-user safe, period.  The reason is that currval
>> returns the value last obtained by nextval *in your own session*,
>> independently of what anyone else has done meanwhile.

> What do you understand for *session* ? Same postgres connection ?

Same postgres connection.  If you are working in an application
environment that does connection pooling, or some such, then this
is unsafe and you'd better go back to option A.

            regards, tom lane

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

Предыдущее
От: "Simeo Reig"
Дата:
Сообщение: Re: Last inserted id
Следующее
От: Dave Page
Дата:
Сообщение: Re: Last inserted id