[sqlalchemy] Re: PostgreSQL and inserting

2008-06-09 Thread Eric Lemoine
Hi. Currently sa does select after insert to get the new serial value? Is my understanding correct? Thx 2008/6/7, Michael Bayer [EMAIL PROTECTED]: On Jun 6, 2008, at 9:11 PM, Cliff Wells wrote: Just an FYI, in PostgreSQL 8.2.4 they added a new feature returning which can be used to avoid

[sqlalchemy] Re: PostgreSQL and inserting

2008-06-09 Thread Michael Bayer
On Jun 9, 2008, at 12:23 PM, Eric Lemoine wrote: Hi. Currently sa does select after insert to get the new serial value? Is my understanding correct? Thx no, SA executes the sequence corresponding to the integer primary key beforehand.

[sqlalchemy] Re: PostgreSQL and inserting

2008-06-06 Thread Michael Bayer
On Jun 6, 2008, at 9:11 PM, Cliff Wells wrote: Just an FYI, in PostgreSQL 8.2.4 they added a new feature returning which can be used to avoid the need for an additional query (to get the value of serial columns) when inserting records: test=# create table foo ( id serial primary key