pgsql: Fix an error in the original coding of holdable cursors: - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix an error in the original coding of holdable cursors:
Date
Msg-id 20070206224924.3EA809FB290@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix an error in the original coding of holdable cursors: PersistHoldablePortal
thought that it didn't have to reposition the underlying tuplestore if the
portal is atEnd.  But this is not so, because tuplestores have separate read
and write cursors ... and the read cursor hasn't moved from the start.
This mistake explains bug #2970 from William Zhang.

Note: the coding here is pretty inefficient, but given that no one has noticed
this bug until now, I'd say hardly anyone uses the case where the cursor has
been advanced before being persisted.  So maybe it's not worth worrying about.

Modified Files:
--------------
    pgsql/src/backend/commands:
        portalcmds.c (r1.59 -> r1.60)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/portalcmds.c.diff?r1=1.59&r2=1.60)

pgsql-committers by date:

Previous
From: mha@pgfoundry.org (User Mha)
Date:
Subject: pginstaller - web: Add text about setting environment variables
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix an error in the original coding of holdable cursors: