OK, what is the table def exactly ? one limitation about psycopg is that sqlalchemy has to be able to pre-execute whatever defaults exist for the primary key columns of the table. if you insert a row into a postgres table, and some of the primary key columns are None, and theres no sequence or anything for it to explicitly execute beforehand, relying instead upon some defaults (i.e. PassiveDefaults) that fire off within postgres in order to insert the row, it has no way of getting back that row if OIDs are turned off. the author of psycopg has offered no solution to this and thinks "cursor.lastrowid" should basically be removed.

On Feb 16, 2006, at 11:55 PM, Robert Leftwich wrote:

Michael Bayer wrote:
but there could be bugs.  what behavior have you observed ?

When inserting rows in a table that has a multi-column primary key defined and the engine is created with use_oid=False, I get back a message "cant use cursor.lastrowid without OIDs enabled".

Robert


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel? cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to