-------------------------------- * ExecStoreBufferHeapTuple * * This function is used to store an on-disk physical tuple from a buffer * into a specified slot in the tuple table. * * tuple: tuple to store * slot: TTSOpsBufferHeapTuple type slot to store it in * buffer: disk buffer if tuple is in a disk page, else InvalidBuffer * * The tuple table code acquires a pin on the buffer w
| 1406 | * -------------------------------- |
| 1407 | */ |
| 1408 | TupleTableSlot * |
| 1409 | ExecStoreBufferHeapTuple(HeapTuple tuple, |
| 1410 | TupleTableSlot *slot, |
| 1411 | Buffer buffer) |
| 1412 | { |
| 1413 | /* |
| 1414 | * sanity checks |
| 1415 | */ |
| 1416 | Assert(tuple != NULL); |
| 1417 | Assert(slot != NULL); |
| 1418 | Assert(slot->tts_tupleDescriptor != NULL); |
| 1419 | Assert(BufferIsValid(buffer)); |
| 1420 | |
| 1421 | if (unlikely(!TTS_IS_BUFFERTUPLE(slot))) |
| 1422 | elog(ERROR, "trying to store an on-disk heap tuple into wrong type of slot"); |
| 1423 | tts_buffer_heap_store_tuple(slot, tuple, buffer, false); |
| 1424 | |
| 1425 | slot->tts_tableOid = tuple->t_tableOid; |
| 1426 | |
| 1427 | return slot; |
| 1428 | } |
| 1429 | |
| 1430 | /* |
| 1431 | * Like ExecStoreBufferHeapTuple, but transfer an existing pin from the caller |
no test coverage detected