Re: PLSQL Question regarding multiple inserts

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: PLSQL Question regarding multiple inserts
Дата
Msg-id 20040228204006.GA12519@svana.org
обсуждение исходный текст
Ответ на PLSQL Question regarding multiple inserts  ("Humble Geek" <humblegeek@rogers.com>)
Список pgsql-general
On Wed, Feb 25, 2004 at 04:11:37AM +0000, Humble Geek wrote:
> Assume XXX is the id from the first insert. How do I get that number? Not
> currval('someSeq') -  'cause someone else may have performed an insert - but
> the id for that specific insert.

Read the documentation carefully, currval() does what you want, it
isn't affected by concurrent inserts.

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> If the Catholic church can survive the printing press, science fiction
> will certainly weather the advent of bookwarez.
>    http://craphound.com/ebooksneitherenorbooks.txt - Cory Doctorow

Вложения

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

Предыдущее
От: Mike Futerko
Дата:
Сообщение: pgCluster in production environment
Следующее
От: Chris Browne
Дата:
Сообщение: Re: efficient storing of urls