Yeah, it seems to be a problem with the server-side cursors. It works fine when I set "client_side_cursors=True". After debugging it a bit it seems to be a problem in ResultProxy/RowProxy. I'm using psycopg 2.0.5.1 and PostgreSQL 8.1.5. Sorry I haven't had time to make a full test case, I'm terribly busy with other stuff right now.

~ Daniel


On Jan 11, 2007, at 12:52 PM, Michael Bayer wrote:

if you could give me a full reproduction case I can see if i get the same result here. also, to test if its the PG cursor change, try sending "client_side_cursors=True" to your create_engine() statement, which will make it use cursors in the default manner.

On Jan 11, 2007, at 8:58 AM, Daniel Miller wrote:

import sqlalchemy as sa

class Version(object):

     table = sa.Table("version", meta,
         sa.Column("id", mu.String, primary_key=True),
         sa.Column("number", mu.String),
     )

def assign_mapper(class_, *args, **kw):
     class_.mapper = sa.mapper(class_, class_.table, *args, **kw)

assign_mapper(Version)

def verify(version, session=None):
     """Verify the connection and the version of the database"""
     if session is None:
         session = sa.create_session()
     ver = session.query(Version).get('schema')
     if ver.number != version:
         raise WrongDatabaseVersionError("got %r expected %r" %
(ver.number, version))


>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to