Hi.

I'm having strange problems when I execute a SHOW command with PostgreSQL.

from sqlalchemy import create_engine, sql, __version__

print __version__

URL = 'postgres://xxx:[EMAIL PROTECTED]/xxx'
db = create_engine(URL, echo=True)
conn = db.connect()

query = sql.text('SHOW CLIENT_ENCODING')
r = conn.execute(query)
print r.scalar()



0.4.6
Traceback (most recent call last):
   File "postgres_show_bug.py", line 11, in <module>
     print r.scalar()
   File "/var/lib/python-support/python2.5/sqlalchemy/engine/base.py", 
line 1661, in scalar
     self.connection._handle_dbapi_exception(e, None, None, self.cursor)
   File "/var/lib/python-support/python2.5/sqlalchemy/engine/base.py", 
line 942, in _handle_dbapi_exception
     raise exceptions.DBAPIError.instance(statement, parameters, e, 
connection_invalidated=is_disconnect)
sqlalchemy.exceptions.InterfaceError: (InterfaceError) cursor already 
closed None None



What's the problem?
If I execute the query directly with psycopg2, there are no errors.



Thanks   Manlio Perillo

--~--~---------~--~----~------------~-------~--~----~
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