Fix from Vadim for simple-minded case SELECT 1 WHERE 1 IN (SELECT 1)

used in regression tests. No longer core dumps.
This commit is contained in:
Thomas G. Lockhart 1998-02-18 07:19:34 +00:00
parent 1aa93cbfa6
commit 6c1abf0d3c

View File

@ -27,7 +27,7 @@
* SeqScan (emp.all) * SeqScan (emp.all)
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeResult.c,v 1.6 1998/02/13 03:26:52 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeResult.c,v 1.7 1998/02/18 07:19:34 thomas Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -291,7 +291,8 @@ ExecReScanResult(Result *node, ExprContext *exprCtxt, Plan *parent)
* if chgParam of subnode is not null then plan * if chgParam of subnode is not null then plan
* will be re-scanned by first ExecProcNode. * will be re-scanned by first ExecProcNode.
*/ */
if (((Plan*) node)->lefttree->chgParam == NULL) if (((Plan*) node)->lefttree &&
((Plan*) node)->lefttree->chgParam == NULL)
ExecReScan (((Plan*) node)->lefttree, exprCtxt, (Plan *) node); ExecReScan (((Plan*) node)->lefttree, exprCtxt, (Plan *) node);
} }