Re: Getting Primary Key Value After Insert

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Getting Primary Key Value After Insert
Дата
Msg-id 8764i7l4ab.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Getting Primary Key Value After Insert  (Richard Broersma Jr <rabroersma@yahoo.com>)
Ответы Re: Getting Primary Key Value After Insert  (Richard Broersma Jr <rabroersma@yahoo.com>)
Список pgsql-general
Richard Broersma Jr <rabroersma@yahoo.com> writes:

> > 3.  If you call currval() will it return 20?  I would think it does.

Yes it does.

> My understanding is that it will provided your are within a transaction.

As long as you're in the same session you're fine. You would have to go out of
your way to break it but if you're using some sort of connection pooling you
wouldn't want to pull a fresh connection from the pool, for example.

--
greg

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

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: Is OpenFTS dead?
Следующее
От: Richard Broersma Jr
Дата:
Сообщение: Re: Getting Primary Key Value After Insert