Pros/cons of various PostGres modules

Dave Reed dreed at capital.edu
Sun Jul 14 14:59:30 EDT 2002


> Date: Sun, 14 Jul 2002 20:33:12 +0200
> From: Gerhard Haering <gerhard at bigfoot.de>
> 
> * 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.



Actually, I was trying to recompile the src.rpm that came with Red Hat
7.3 to use Python2.2 and still ended up with the bug. I was starting
to think it was a strange interaction with different versions of
Python. Hmm, I wonder why that didn't work.



> > 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.


Thanks for the info.

Dave





More information about the Python-list mailing list