From bb742407947ad1cbf19355d24282380d576e7654 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 20 Feb 2011 00:17:18 -0500 Subject: Implement an API to let foreign-data wrappers actually be functional. This commit provides the core code and documentation needed. A contrib module test case will follow shortly. Shigeru Hanada, Jan Urbanski, Heikki Linnakangas --- src/backend/optimizer/plan/setrefs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/backend/optimizer/plan/setrefs.c') diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c index d004f6cf12f..b1c181a1cc5 100644 --- a/src/backend/optimizer/plan/setrefs.c +++ b/src/backend/optimizer/plan/setrefs.c @@ -402,6 +402,18 @@ set_plan_refs(PlannerGlobal *glob, Plan *plan, int rtoffset) fix_scan_list(glob, splan->scan.plan.qual, rtoffset); } break; + case T_ForeignScan: + { + ForeignScan *splan = (ForeignScan *) plan; + + splan->scan.scanrelid += rtoffset; + splan->scan.plan.targetlist = + fix_scan_list(glob, splan->scan.plan.targetlist, rtoffset); + splan->scan.plan.qual = + fix_scan_list(glob, splan->scan.plan.qual, rtoffset); + } + break; + case T_NestLoop: case T_MergeJoin: case T_HashJoin: -- cgit v1.2.3