[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] DBAPI Problem

From: Horst Herb
Subject: [Gnumed-devel] DBAPI Problem
Date: Tue, 7 May 2002 23:39:45 +1000

I just made the painful experience that not all "database adapters are 
created equal".
PyPgSQL takes not only a different dsn string / login parameters than pgdb 
(PyGreSQL) - which is easy to intercept & fix - but it also returns 
different objects from a query when date and/or time is involved.

This is most painful, as it basically voids the perceived advantages of 
using the DB-API. It is even more painful, as pyPgSQL offered a nice 
binary "setup.exe" package for Windows users. However, on Linux at least 
pyPgSQL seems to perform worse the PyGreSQL. While PyGreSQL returns dates 
and times as strings, PyGreSQL returns them as objects modeled after 
mxDate. As we are working a lot with dates and times, it makes it 
unfeasible to write a compatibility wrapper - performance penalty would be 
too high. I checked with psycopg - yet another way to handle dates and 
times, yet another DSN format.

What now? I suggest we stick to PyGreSQL - being included in the official 
postgresql source tree is some sort of indicator that it is here to stay 
and wil continue to be developed. Anybody with Windows & a C compiler on 
Windows keen on building a binary and making it available for upload?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]