Re: getting back autonumber just inserted

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: getting back autonumber just inserted
Дата
Msg-id 20050707205725.GA28200@winnie.fuhr.org
обсуждение исходный текст
Ответ на getting back autonumber just inserted  (mail TechEvolution <mail@techevolution.be>)
Ответы Re: getting back autonumber just inserted  (PFC <lists@boutiquenumerique.com>)
Список pgsql-sql
On Thu, Jul 07, 2005 at 02:47:23PM -0600, Larry Meadors wrote:
>
> If you have a trigger on your table that inserts a record in a table
> and shares the same sequence, what value do you get back, the
> triggered curval, or the currently inserted one?

That's a different issue than whether currval() is subject to
interference from other transactions.  And just wait until PostgreSQL
8.1 comes out and people start using lastval() -- then it could get
*really* confusing which sequence value you're getting.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: getting back autonumber just inserted
Следующее
От: PFC
Дата:
Сообщение: Re: getting back autonumber just inserted