From: Robert Haas Date: Thu, 19 Nov 2015 02:17:50 +0000 (-0500) Subject: Fix incomplete set_foreignscan_references handling for fdw_recheck_quals X-Git-Tag: REL9_6_BETA1~1081 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7907a949abf100b5a1e1def1184ba1e6fc8b9fd7;p=postgresql Fix incomplete set_foreignscan_references handling for fdw_recheck_quals KaiGai Kohei --- diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c index 48d6e6fd78..d2232c227b 100644 --- a/src/backend/optimizer/plan/setrefs.c +++ b/src/backend/optimizer/plan/setrefs.c @@ -1129,6 +1129,12 @@ set_foreignscan_references(PlannerInfo *root, itlist, INDEX_VAR, rtoffset); + fscan->fdw_recheck_quals = (List *) + fix_upper_expr(root, + (Node *) fscan->fdw_recheck_quals, + itlist, + INDEX_VAR, + rtoffset); pfree(itlist); /* fdw_scan_tlist itself just needs fix_scan_list() adjustments */ fscan->fdw_scan_tlist =