From: Gerhard H. <gh...@gh...> - 2004-11-22 08:22:00
|
On Mon, Nov 22, 2004 at 10:15:12AM +1000, Timothy Smith wrote: > after i do a db.commit() is it possible to return the values written > to the db? i have a transaction id that is an auto incrementing > number, it would be much quicker if i could know that number without > having to do a query No, the only thing that's possible without issuing two queries is cursor.oidValue. It's the PostgreSQL-internal id of the object (i. e. row) you created. PostgreSQL not having a RETURNING clause AFAIK if you insist on only one statement, then I think you can achieve this with an appropriate stored procedure that you call via pyPgSQL. -- Gerhard |