---------------------------------------------------------------- * ExecEndIndexOnlyScan * ---------------------------------------------------------------- */
| 365 | * ---------------------------------------------------------------- |
| 366 | */ |
| 367 | void |
| 368 | ExecEndIndexOnlyScan(IndexOnlyScanState *node) |
| 369 | { |
| 370 | Relation indexRelationDesc; |
| 371 | IndexScanDesc indexScanDesc; |
| 372 | |
| 373 | /* |
| 374 | * extract information from the node |
| 375 | */ |
| 376 | indexRelationDesc = node->ioss_RelationDesc; |
| 377 | indexScanDesc = node->ioss_ScanDesc; |
| 378 | |
| 379 | /* Release VM buffer pin, if any. */ |
| 380 | if (node->ioss_VMBuffer != InvalidBuffer) |
| 381 | { |
| 382 | ReleaseBuffer(node->ioss_VMBuffer); |
| 383 | node->ioss_VMBuffer = InvalidBuffer; |
| 384 | } |
| 385 | |
| 386 | /* |
| 387 | * Free the exprcontext(s) ... now dead code, see ExecFreeExprContext |
| 388 | */ |
| 389 | #ifdef NOT_USED |
| 390 | ExecFreeExprContext(&node->ss.ps); |
| 391 | if (node->ioss_RuntimeContext) |
| 392 | FreeExprContext(node->ioss_RuntimeContext, true); |
| 393 | #endif |
| 394 | |
| 395 | /* |
| 396 | * clear out tuple table slots |
| 397 | */ |
| 398 | if (node->ss.ps.ps_ResultTupleSlot) |
| 399 | ExecClearTuple(node->ss.ps.ps_ResultTupleSlot); |
| 400 | ExecClearTuple(node->ss.ss_ScanTupleSlot); |
| 401 | |
| 402 | /* |
| 403 | * close the index relation (no-op if we didn't open it) |
| 404 | */ |
| 405 | if (indexScanDesc) |
| 406 | index_endscan(indexScanDesc); |
| 407 | if (indexRelationDesc) |
| 408 | index_close(indexRelationDesc, NoLock); |
| 409 | } |
| 410 | |
| 411 | /* ---------------------------------------------------------------- |
| 412 | * ExecIndexOnlyMarkPos |
no test coverage detected