Postgresql driver written in pure Python

Showing 1-1 of 1 messages
Postgresql driver written in pure Python Barry Pederson 9/22/08 1:16 PM
I've been working for some time on a pure-Python PostgreSQL driver, and
have recently worked on getting it to function with Django.  It's to the
point now where it seemed to pass all Django 1.0 unittests.  The
bpgsql-2.0alpha1.tgz package can be found here:

It's certainly going to be slower than psycopg, but may be of interest
to PyPy or Jython users perhaps.

The trickiest part in getting it working with Django has been the
transactions.  Exactly the things currently being discussed in the
"Postgresql transaction aborts, despite being in autocommit mode" thread
-  which I didn't want to hijack, but feel this is somewhat related to.

My driver varies from the DB-API in that it doesn't do anything on its
own with transactions, so the Django-backend wrapper tries to do the
automagical insertions of 'BEGIN' statements to satisfy Django's
expectations.  That, and a few other hacks to make the Django unittests
happy are easy to see since they're not buried deep in the DB driver itself.