When trying to insert an object into a MiddleKit/PostgreSQL store, I get
"/home/jdhildeb/projects/Webware/MiddleKit/Run/PostgreSQLObjectStore.py", line 36, in _insertObject
oid = curs.lastoid()
AttributeError: pgdbCursor instance has no attribute 'lastoid'
2 1.08 secs /resourceworks/Library?objectid=0
Google turned up this informative hit:
And it doesn't look like the pygresql bindings have been updated since
Dec 2001. Can anyone confirm that pygresql still needs to be patched to
make cursor.lastoid available?
I'm actually thinking of fixing this a different way. Since each table
in pgsql has an associated sequence, you can do:
to get the next value and increment the sequence (atomically).
Then you just specify the id explicitly when doing the insert.
PostgreSQLObjectStore could do this internally - it's clean and
eliminates the need for lastoid. Any objections if I make this change?
Jason D. Hildebrand