Postgres support

Gerhard Häring gerhard.nospam at bigfoot.de
Mon Jul 2 18:09:44 EDT 2001


On Mon, 02 Jul 2001 16:25:20 -0400, robin at illusionsexeculink.com wrote:
>[...]
>With Python I'm left scrambling around trying out different half-done
>modules.
>
>This is a significant barrier to Python adoption. Until Python ships
>with modules for each major database it will not be a mature tool for
>many users.

Java "ships" with a broken JDBC implementation for ODBC. Everything else you'll
have to download and install yourself.

>As an example, I would like to find a cross-platform (Linux, Windows,
>etc.) Postgres interface that works with Python 2 or greater and
>Postgres 7 or greater, conforming to the dbAPI. Not too much to ask,
>one might think.

>I've found these four candidates, but judging by their sometimes
>sparse web sites, none fit the bill. But I could be wrong.

I can't comment on conformance to the DBAPI 2 or stability, because I usually
don't use advanced database stuff.

>PyGreSQL -- http://www.druid.net/pygresql/

This one is now in PostgreSQL CVS. The most recent version is the one from
PostgreSQL 7.1.2 (PyGreSQL 3.2), even if the website doesn't tell you, Windows
is now supported (you can download a binary distribution from my homepage or
build yourself).

>psycopg -- http://initd.org/Software/psycopg

It seems to be optimized for heavily threaded applications. It looks quite good
and well thought-out. Unfortunately, it makes much use of Unix libraries, so it
was too difficult for me to port it to Windows. Plus, I am no great fan of
GPL'd Python libraries.

>PoPy -- http://popy.sourceforge.net/

The new Nekhem website still doesn't work ...

>PyPgSQL -- http://www.sf.net/projects/pypgsql

Looks very good to me and is progressing fast. The CVS version supports
Windows, too 8-) (you'll need to compile with gcc, Visual C++ won't work due to
lack of "long long" support). If you want to try this on win32, you'll need a
post-7.1.2 PostgreSQL patch from CVS (the file libpq.def). Or you can ask me in
PM and I can provide a working win32 version.

It looks like libpq wasn't used very much on Windows, there is at least one
unsolved issue on win32 (affects everything using libpq, including PyGreSQL and
PyPgSQL).

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://highqualdev.com              public key at homepage
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))



More information about the Python-list mailing list