From 778a21ca947a60a64a29925322941267512b030c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 27 Feb 2001 22:07:34 +0000 Subject: 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. --- src/backend/tcop/pquery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/tcop/pquery.c') diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index 3481bc675e..b36b9f6510 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -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. -- cgit v1.2.1