[DB-SIG] PyGreSQL pgsource object

Horst Herb subscriptions@gnumed.net
Thu, 31 Oct 2002 16:37:58 +1100

Gerhard Häring wrote:

> What's wrong with using a DB-API module like pyPgSQL or psycopg, or even
> PyGreSQL's pgdb module? Does pgsource offer anything that the DB-API interface
> doesn't, or that cannot be easily accomplished using the DB-API interface?

While there is nothing wrong with the options you mention, the DB-API is 
far from being a solution. Neither connection strings nor the way 
returned rows are typed nor the way dates are handled are managed are 
consistent between adapters.

We ended up having to write wrappers around wrappers to just become 
independend between the three main Postgres DB-API "compliant" modules 
for that very reason, which was pointless.

When trying to use the same code for MySQL as for Postgres, it was a 
complete fiasco.

We settled for PyPgSQL because it offered the simplest installation for 
those using Windows, but it leaves the question why the heck the DB-API 
cannot be a bit more consistent and specific.