| 528 | } |
| 529 | |
| 530 | void |
| 531 | ExecSquelchMaterial(MaterialState *node, bool force) |
| 532 | { |
| 533 | /* |
| 534 | * If this Material is shielding the underlying nodes from rescanning (for |
| 535 | * example, if there is a Motion node below), then keep the tuplestore. |
| 536 | * Also, don't recurse to the subtree in that case, because we might need |
| 537 | * to read more tuples from it after a ReScan. Most likely we have already |
| 538 | * read all the tuples from the underlying node in that case, but it's |
| 539 | * possible that ExecMaterial hasn't been called even once yet, and we |
| 540 | * haven't created the tuplestore yet. |
| 541 | */ |
| 542 | if (!node->ss.ps.squelched && (!node->delayEagerFree || force)) |
| 543 | { |
| 544 | ExecEagerFreeMaterial(node); |
| 545 | node->ss.ps.squelched = true; |
| 546 | ExecSquelchNode(outerPlanState(node), force); |
| 547 | } |
| 548 | } |
no test coverage detected