Postgresql - Preferred Python Library

Lee Harr missive at
Fri Sep 10 21:55:47 CEST 2004

On 2004-09-10, Matt Goodall <matt at> wrote:
> I've just started experimenting with psycopg2
> ( and it's looking good.
> As far as I know, psycopg2 is the only DB-API 2.0 implementation for
> PostgreSQL that uses Python 2.3's datetime types by default.

ooh, aah.   :o)

Yes, the datetime handling in the older psycopg was getting on my
nerves... Native datetime is going to make things much nicer.

That said, psycopg works very well for me.

The only other thing that is a bit strange is passing array
types in to the database. I have been using this:

alist = ['foo', 'bar']
query = 'SELECT ARRAY%(alist)s'
execute(query, locals())

It works perfectly well, but it seems a bit strange...

More information about the Python-list mailing list