* postgresRecheckForeignScan * Execute a local join execution plan for a foreign join */
| 2342 | * Execute a local join execution plan for a foreign join |
| 2343 | */ |
| 2344 | static bool |
| 2345 | postgresRecheckForeignScan(ForeignScanState *node, TupleTableSlot *slot) |
| 2346 | { |
| 2347 | Index scanrelid = ((Scan *) node->ss.ps.plan)->scanrelid; |
| 2348 | PlanState *outerPlan = outerPlanState(node); |
| 2349 | TupleTableSlot *result; |
| 2350 | |
| 2351 | /* For base foreign relations, it suffices to set fdw_recheck_quals */ |
| 2352 | if (scanrelid > 0) |
| 2353 | return true; |
| 2354 | |
| 2355 | Assert(outerPlan != NULL); |
| 2356 | |
| 2357 | /* Execute a local join execution plan */ |
| 2358 | result = ExecProcNode(outerPlan); |
| 2359 | if (TupIsNull(result)) |
| 2360 | return false; |
| 2361 | |
| 2362 | /* Store result in the given slot */ |
| 2363 | ExecCopySlot(slot, result); |
| 2364 | |
| 2365 | return true; |
| 2366 | } |
| 2367 | |
| 2368 | /* |
| 2369 | * find_modifytable_subplan |
nothing calls this directly
no test coverage detected