during testing, I found out that this code works, but I'm wondering if it should...
# this returns a tuple `(464061L,)` max_id__snapshot = dbSession.query(sqlalchemy.func.max(models.Snapshot.id)).first() print type(max_id__snapshot) <class 'sqlalchemy.util._collections.KeyedTuple'> # this submits the tuple to psycopg2 `(464061L,)` ; an INT is inserted trackedData.max_id__snapshot = max_id__snapshot print type(trackedData.max_id__snapshot) <class 'sqlalchemy.util._collections.KeyedTuple'> dbSession.commit() print type(trackedData.max_id__snapshot) <type 'int'> it's still a KeyedTuple on a `flush()`. looking at the debug logs, psycopg2 is getting the tuple and inserting as an INT. the post-commit `type` is via the select value. does anyone know if this "should" work? looking at the dbapi and psycopg2 docs, there's nothing to suggest this should work. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.