---------------------------------------------------------------- * ExecReScanForeignScan * * Rescans the relation. * ---------------------------------------------------------------- */
| 342 | * ---------------------------------------------------------------- |
| 343 | */ |
| 344 | void |
| 345 | ExecReScanForeignScan(ForeignScanState *node) |
| 346 | { |
| 347 | ForeignScan *plan = (ForeignScan *) node->ss.ps.plan; |
| 348 | EState *estate = node->ss.ps.state; |
| 349 | PlanState *outerPlan = outerPlanState(node); |
| 350 | |
| 351 | /* |
| 352 | * Ignore direct modifications when EvalPlanQual is active --- they are |
| 353 | * irrelevant for EvalPlanQual rechecking |
| 354 | */ |
| 355 | if (estate->es_epq_active != NULL && plan->operation != CMD_SELECT) |
| 356 | return; |
| 357 | |
| 358 | node->fdwroutine->ReScanForeignScan(node); |
| 359 | |
| 360 | /* |
| 361 | * If chgParam of subnode is not null then plan will be re-scanned by |
| 362 | * first ExecProcNode. outerPlan may also be NULL, in which case there is |
| 363 | * nothing to rescan at all. |
| 364 | */ |
| 365 | if (outerPlan != NULL && outerPlan->chgParam == NULL) |
| 366 | ExecReScan(outerPlan); |
| 367 | |
| 368 | ExecScanReScan(&node->ss); |
| 369 | } |
| 370 | |
| 371 | /* ---------------------------------------------------------------- |
| 372 | * ExecForeignScanEstimate |
no test coverage detected