* Like ExecStoreBufferHeapTuple, but transfer an existing pin from the caller * to the slot, i.e. the caller doesn't need to, and may not, release the pin. */
| 1432 | * to the slot, i.e. the caller doesn't need to, and may not, release the pin. |
| 1433 | */ |
| 1434 | TupleTableSlot * |
| 1435 | ExecStorePinnedBufferHeapTuple(HeapTuple tuple, |
| 1436 | TupleTableSlot *slot, |
| 1437 | Buffer buffer) |
| 1438 | { |
| 1439 | /* |
| 1440 | * sanity checks |
| 1441 | */ |
| 1442 | Assert(tuple != NULL); |
| 1443 | Assert(slot != NULL); |
| 1444 | Assert(slot->tts_tupleDescriptor != NULL); |
| 1445 | Assert(BufferIsValid(buffer)); |
| 1446 | |
| 1447 | if (unlikely(!TTS_IS_BUFFERTUPLE(slot))) |
| 1448 | elog(ERROR, "trying to store an on-disk heap tuple into wrong type of slot"); |
| 1449 | tts_buffer_heap_store_tuple(slot, tuple, buffer, true); |
| 1450 | |
| 1451 | slot->tts_tableOid = tuple->t_tableOid; |
| 1452 | |
| 1453 | return slot; |
| 1454 | } |
| 1455 | |
| 1456 | /* |
| 1457 | * Store a minimal tuple into TTSOpsMinimalTuple type slot. |
no test coverage detected