Re: GetLastInsertID ?

Поиск
Список
Период
Сортировка
Искать
От
Mike Nolan
Тема
Re: GetLastInsertID ?
Дата
Msg-id
200401012137.i01Lblr6003362@gw.tssi.com
Ответ на
Re: GetLastInsertID ? (Dennis Bjorklund)
Список
Дерево обсуждения
GetLastInsertID ? Stephane Pinel <spinel@noos.fr>
Re: GetLastInsertID ? Dave Cramer <pg@fastcrypt.com>
Re: GetLastInsertID ? Oliver Elphick <olly@lfix.co.uk>
Re: GetLastInsertID ? Martijn van Oosterhout <kleptog@svana.org>
Re: GetLastInsertID ? Dennis Bjorklund <db@zigo.dhs.org>
Re: GetLastInsertID ? Mike Nolan <nolan@gw.tssi.com>
Re: GetLastInsertID ? Dave Cramer <pg@fastcrypt.com>
Re: GetLastInsertID ? Martin Marques <martin@bugs.unl.edu.ar>
Re: GetLastInsertID ? Martijn van Oosterhout <kleptog@svana.org>
Re: GetLastInsertID ? Mike Nolan <nolan@gw.tssi.com>
Re: GetLastInsertID ? Tom Lane <tgl@sss.pgh.pa.us>
Re: GetLastInsertID ? Mike Nolan <nolan@gw.tssi.com>
Re: GetLastInsertID ? Doug McNaught <doug@mcnaught.org>
Re: GetLastInsertID ? Mike Nolan <nolan@gw.tssi.com>
Re: GetLastInsertID ? Martijn van Oosterhout <kleptog@svana.org>
Re: GetLastInsertID ? Tom Lane <tgl@sss.pgh.pa.us>
Re: GetLastInsertID ? Stephane Pinel <spinel@noos.fr>
> > the last inserted id in the table like we do with MySQL using the 
> > GetLastInsertID ?
> > 
> > My need is to get back the new id just after inserting.
> 
> Use currval() after you have inserted.

That will not necessarily tell you the last insertion, depending
upon how many other users there are doing inserts.  

For that matter, I'm not sure that the MySQL method works with multiple 
users either.
--
Mike Nolan
В списке pgsql-general по дате отправления
От: Mark Kirkwood
Дата:
От: Baldur Norddahl
Дата:
Сообщение: why the need for is null?
FAQ