You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will be necessary for gevent support. Both psycopg2 and psycopg2cffi call through to the native libpq, which manages its own native sockets and can't be portably monkey patched.
It looks like the best supported is probably pg8000. If there's a better one, please let me know!
The text was updated successfully, but these errors were encountered:
The major difference from psycopg2/cffi is that it doesn't have native
lobject support. This is easily worked around, but this draft is not
complete because it doesn't support chunks. Some refactoring will be
required to elegantly handle this.
Two minor differences:
- It doesn't support multiple statements in a single `cursor.execute()`
call. Apparently it turns all statements into prepared statements,
because the error is from the server. Easily worked around and
unlikely to be a perfomance difference.
- It handles transaction isolation levels like most other drivers, in
SQL. This could be handled more elegantly too.
One thing: The server spits out lots of "WARNING: not in a transaction".
If I enable statement logging, I see every `commit` immediately followed
by a `rollback`, which generates the warning. I'm not sure if that's
just us, or something the driver is doing differently (e.g, maybe
psycopg2/cffi always follows `commit` with `begin`? and then when we try
to `rollback` we're already in a transaction?). Annoying but harmless.
Still, would like to figure it out though.
Testing this pure-python driver on Python 3 also revealed a lot of
connection leaks, many of which I've fixed, but there are probably more.
This should be a win for PyPy. See also zopefoundation/ZODB#78.
The testing matrix is expanded to test the pure-python drivers on
CPython too and to test pg8000. (Travis will be the first time I run
psycopg2 tests; hope I didn't break anything!)
Fixes#85.
This will be necessary for gevent support. Both psycopg2 and psycopg2cffi call through to the native libpq, which manages its own native sockets and can't be portably monkey patched.
It looks like the best supported is probably pg8000. If there's a better one, please let me know!
The text was updated successfully, but these errors were encountered: