Postgresql driver written in pure Python

36 views
Skip to first unread message

Barry Pederson

unread,
Sep 22, 2008, 4:16:35 PM9/22/08
to django-d...@googlegroups.com
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:

http://barryp.org/software/bpgsql/

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.

Enjoy

Barry

Reply all
Reply to author
Forward
0 new messages