On Fri, Jul 08, 2005 at 12:26:30AM +0200, PFC wrote:
> 
> >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.
> 
>       What happens if an INSERT trigger inserts something into another 
>       table  which also has a sequence ?

Using what, lastval()?  The app will get very confused, because it'll
get the value from the sequence used in the trigger.  Using currval
there is no problem, but you already knew that.

-- 
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"Hay quien adquiere la mala costumbre de ser infeliz" (M. A. Evans)

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to