| 202 | } |
| 203 | |
| 204 | static void |
| 205 | endCurrentIndexScan(DynamicIndexScanState *node) |
| 206 | { |
| 207 | if (node->indexScanState) |
| 208 | { |
| 209 | ExecEndIndexScan(node->indexScanState); |
| 210 | node->indexScanState = NULL; |
| 211 | table_close(node->ss.ss_currentRelation, NoLock); |
| 212 | } |
| 213 | else if (node->indexOnlyScanState) |
| 214 | { |
| 215 | ExecEndIndexOnlyScan(node->indexOnlyScanState); |
| 216 | node->indexOnlyScanState = NULL; |
| 217 | table_close(node->ss.ss_currentRelation, NoLock); |
| 218 | } |
| 219 | ExecResetTupleTable(node->tuptable, true); |
| 220 | node->tuptable = NIL; |
| 221 | MemoryContextReset(node->partitionMemoryContext); |
| 222 | } |
| 223 | |
| 224 | /* |
| 225 | * This function initializes a part and returns true if a new index has been prepared for scanning. |
no test coverage detected