mfenniak / pg8000

A Pure-Python PostgreSQL Driver
http://pythonhosted.org/pg8000/
Other
222 stars 55 forks source link

Paramstyle not propagating from sqlalchemy #139

Closed viraptor closed 6 years ago

viraptor commented 7 years ago

Not sure if this should be raised with sqlalchemy or here, but it doesn't look like sqlalchemy can set the paramstyle on pg8000 engine. Essentially, I'm running:

e = sqlalchemy.create_engine('postgresql+pg8000://.....', paramstyle='qmark')
c = e.connect()
c.execute('UPDATE xxx SET x = ?', 1)

and it fails parsing. Using %s in the query works fine.

I'm using pg8000 1.11.0, SQLAlchemy 1.1.14. Running on Python 3.6.

tlocke commented 6 years ago

Hi @viraptor , I think this should be raised with sqlalchemy. If it turns out that there's a problem with pg8000 itself, then by all means submit a bug.