Fix compiler warning in non-assert builds, introduced in f862d57057f.
authorAndres Freund
Thu, 3 Feb 2022 18:44:26 +0000 (10:44 -0800)
committerAndres Freund
Thu, 3 Feb 2022 18:44:38 +0000 (10:44 -0800)
Discussion: https://postgr.es/m/20220203183655[email protected]
Backpatch: 14-, like f862d57057f

src/backend/executor/nodeForeignscan.c

index a5b37748904bf071847daadf1013fbbf1d5f56ca..d27849a4f7c2dd4d4d1089b46bbd522eab617631 100644 (file)
@@ -44,7 +44,6 @@ ForeignNext(ForeignScanState *node)
    TupleTableSlot *slot;
    ForeignScan *plan = (ForeignScan *) node->ss.ps.plan;
    ExprContext *econtext = node->ss.ps.ps_ExprContext;
-   EState     *estate = node->ss.ps.state;
    MemoryContext oldcontext;
 
    /* Call the Iterate function in short-lived context */
@@ -55,7 +54,7 @@ ForeignNext(ForeignScanState *node)
         * direct modifications cannot be re-evaluated, so shouldn't get here
         * during EvalPlanQual processing
         */
-       Assert(estate->es_epq_active == NULL);
+       Assert(node->ss.ps.state->es_epq_active == NULL);
 
        slot = node->fdwroutine->IterateDirectModify(node);
    }