Pros/cons of various PostGres modules

Gerhard Haering gerhard at bigfoot.de
Sun Jul 14 14:33:12 EDT 2002


* Dave Reed <dreed at capital.edu> [2002-07-14 14:08 -0400]:
> > Gerhard wrote:
> > PyGreSQL is IMO very badly maintained: there was a serious bug with
> > cursor.fetchone() always returning the first row of the resultset, which
> > made cursors basically unusable. It was known for over a year until
> > somebody (me) got annoyed enough to take the half-an hour to look into
> > the Python and C code, write a patch and submit it to the PostgreSQL
> > developers.
> 
> Thank you! I've been bit by this bug. PyGreSQL is the one that comes
> with postgresql - correct?

Yes, and patches and bug reports should go to the PostgreSQL project.

> I found it worked fine on my Red Hat 7.3 system with their python 1.5.2
> rpm, but as soon as I tried to get it working with my installation of
> python2.2 I had this problem.

You were also using a different PostgreSQL version, then: the bugfix ended
up as a last-minute fix in PostgreSQL 7.1.3.

> Can you tell me where the source for this patch is so I can make certain
> it's included in any postgresql installations I make?

Just ensure you're using the PyGreSQL (in src/interfaces/python) from at
least PostgreSQL 7.1.3.

> As I understand it - please correct me if I'm wrong - I could install
> pyPgSQL and it would work w/o any changes to my code (other than
> importing that module) if I've stayed with the DB-API. Is this correct?

In theory, you should only need to adjust the module and the parameters to
the connection method. There are, however, certain differences, mostly  wrt
to different ways to access PostgreSQL-specific features like notifications
or exotic SQL features like ARRAYs.

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
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