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

From PFC
Subject Re: getting back autonumber just inserted
Date
Msg-id op.stkh1kjcth1vuj@localhost
Whole thread Raw
In response to Re: getting back autonumber just inserted  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-sql
>>     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.
I knew but I forgot since I use an ORM which handles all the mess ;)




pgsql-sql by date:

Previous
From: Varun Mehta
Date:
Subject: Make COUNT(*) Faster?
Next
From: PFC
Date:
Subject: Re: getting back autonumber just inserted