---------------------------------------------------------------- * ExecEndRecursiveUnion * * frees any storage allocated through C routines. * ---------------------------------------------------------------- */
| 289 | * ---------------------------------------------------------------- |
| 290 | */ |
| 291 | void |
| 292 | ExecEndRecursiveUnion(RecursiveUnionState *node) |
| 293 | { |
| 294 | /* Release tuplestores */ |
| 295 | if (node->working_table != NULL) |
| 296 | tuplestore_end(node->working_table); |
| 297 | if (node->intermediate_table != NULL) |
| 298 | tuplestore_end(node->intermediate_table); |
| 299 | |
| 300 | /* free subsidiary stuff including hashtable */ |
| 301 | if (node->tempContext) |
| 302 | MemoryContextDelete(node->tempContext); |
| 303 | if (node->tableContext) |
| 304 | MemoryContextDelete(node->tableContext); |
| 305 | |
| 306 | /* |
| 307 | * close down subplans |
| 308 | */ |
| 309 | ExecEndNode(outerPlanState(node)); |
| 310 | ExecEndNode(innerPlanState(node)); |
| 311 | } |
| 312 | |
| 313 | /* ---------------------------------------------------------------- |
| 314 | * ExecReScanRecursiveUnion |
no test coverage detected