Re: [sqlalchemy] Bulk Inserts and Unique Constraints

2014-03-26 Thread Cosmia Luna
]) calls. > > > > On Mar 24, 2014, at 5:33 AM, Cosmia Luna > > wrote: > > INSERT statement of postgresql supports RETURNING, read this > http://docs.sqlalchemy.org/en/rel_0_8/core/dml.html#sqlalchemy.sql.expression.Insert.returning > > On Monday, March 24, 2014

Re: [sqlalchemy] Bulk Inserts and Unique Constraints

2014-03-24 Thread Cosmia Luna
INSERT statement of postgresql supports RETURNING, read this http://docs.sqlalchemy.org/en/rel_0_8/core/dml.html#sqlalchemy.sql.expression.Insert.returning On Monday, March 24, 2014 2:43:46 PM UTC+8, James Meneghello wrote: > > Oops, I should add - the reason I can't use an itertools counter to

[sqlalchemy] Re: Bulk Inserts and Unique Constraints

2014-03-23 Thread Cosmia Luna
Anyway, I don't think you should issue so many SELECT's, performance suffers from it most, I think. INSERT statement will return the inserted id's for you, maybe you want to read this http://docs.sqlalchemy.org/en/latest/core/tutorial.html#executing Skip duplicates... well if you turn off the c