1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Tweak portal (cursor) code so that it will not call the executor again

when user does another FETCH after reaching end of data, or another
FETCH backwards after reaching start.  This is needed because some plan
nodes are not very robust about being called again after they've already
returned NULL; for example, MergeJoin will crash in some states but not
others.  While the ideal approach would be for them all to handle this
correctly, it seems foolish to assume that no such bugs would creep in
again once cleaned up.  Therefore, the most robust answer is to prevent
the situation from arising at all.
This commit is contained in:
Tom Lane
2001-02-27 22:07:34 +00:00
parent f5ea88ac6e
commit 778a21ca94
4 changed files with 77 additions and 108 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.41 2001/01/24 19:43:09 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.42 2001/02/27 22:07:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -248,7 +248,7 @@ ProcessQuery(Query *parsetree,
* ----------------
*/
if (isRetrieveIntoRelation)
queryDesc->dest = (int) None;
queryDesc->dest = None;
/* ----------------
* create a default executor state.