Re: Fix for fetchone() and fetchmany() in Python interface - Mailing list pgsql-patches

From Fernando Nasser
Subject Re: Fix for fetchone() and fetchmany() in Python interface
Date
Msg-id 3B7AEC05.6A313DB8@cygnus.com
Whole thread Raw
In response to Re: Fix for fetchone() and fetchmany() in Python interface  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Fix for fetchone() and fetchmany() in Python interface  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Bruce Momjian wrote:
>
> > Gerhard H?ring wrote:
> > >
> > > This patch fixes the well-known but unfixed bug that fetchone() always returns
> > > the first result in the DB-API compliant wrapper. It turned out that the bug
> > > was way down in the C code.
> > >
> > > Gerhard
> >
> > This is great.  It solves a problem we were having.
> >
> > Bruce: this should go into 7.1.3 (if possible).  It applies cleanly and,
> > without it, we basically can't use Python (cursors don't work, basically).
>
> We only put major lowrisk fixes in 7.1.X releases, and this one is too
> minor for the risk.  Sorry.
>

Bruce,

It may be too late for including it, but it would not be for the reasons above.

1) low risk

It is low risk.  It is a one line patch that only affects the python interface code.

2) major

It is major.  Without it we can consider that 7.1 does not support Python
(at least, not the 2.0 API).

What use is an interface that keeps returning the same row (the first one)
every time you call the cursor trying to get the next row?

It happens with both functions fetchone() and fetchmany(), so there is no
workaround besides reading the whole table (which sometimes is not feasible).


So, it is both low risk and major.

Cheers,
Fernando

--
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: Proposal for encrypting pg_shadow passwords
Next
From: Bruce Momjian
Date:
Subject: Re: Fix for fetchone() and fetchmany() in Python interface