Re: getting back autonumber just inserted - Mailing list pgsql-sql

From Michael Fuhr
Subject Re: getting back autonumber just inserted
Date
Msg-id 20050707205725.GA28200@winnie.fuhr.org
Whole thread Raw
In response to getting back autonumber just inserted  (mail TechEvolution <mail@techevolution.be>)
Responses Re: getting back autonumber just inserted
List 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 by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: getting back autonumber just inserted
Next
From: PFC
Date:
Subject: Re: getting back autonumber just inserted