[DB-SIG] Popy - Psycopg - PyPgSQL - PyGreSQL

hazmat hazmat@objectrealms.net
Tue, 1 Oct 2002 05:28:54 -0700


On Tuesday 01 October 2002 03:21 am, Magnus Lycka wrote:
> At 10:45 2002-10-01 +0200, Jekabs Andrushaitis wrote:
> >I am not saying that [psycopg] is best, however my advice is
> >not to use Python module supplied with PostgreSQL sources...
>
> Why not?
>
>
> In general I don't mind diversity, but I four
> drivers for the same database seems a bit redundant.

imho, i would only use pyscopg or pypgsql. of the four they are under the most 
active development.

basically my deciding factor is whether i want to use libpq (pgsql c client 
lib) or python db-api or if i want to use zope, if db-api i generally would 
recommend pyscopg as it implements db-api compliance at the c level over 
libpq. pypgsql is a c extension binding over libpq, with db-api interface 
written in python. if zope, i would use psycopg as it has extensive testing 
in that area, and converts to mxDateTimes to ZopeTimes. imho, the two 
bindings serve different audiences. 

> Any chance that some of these will merge?

not likely.

> After all, largely due to open source, we are
> going towards more and more of a component
> architecture in our software solutions, and we
> use different libraries and frameworks for different
> parts of the system. A library or framework that
> is built in python and use PostgreSQL might use
> any of these four drivers.

not really, the limitations/bugs of some of the drivers will become apparent 
quickly.

> Thus, if we pick several of these components, that
> do different things, we might end up with several
> different and possibly conflicting database drivers
> for communication between Python and PostgreSQL. I
> haven't been bitten by this yet, but it seems a
> bit confusing to me...

ideally their would be a driver framework with plugins, and we'd only have to 
worry about the portability of our sql. as it is, most people implement their
own abstraction layer, as it does not seem apparent to me, that the db-sig is 
going to promote db-api from interface recommendations to framework.

-haz