-------------------------------- * ExecStoreHeapTuple * * This function is used to store an on-the-fly physical tuple into a specified * slot in the tuple table. * * tuple: tuple to store * slot: TTSOpsHeapTuple type slot to store it in * shouldFree: true if ExecClearTuple should pfree() the tuple * when done with it * * shouldFree is normally set 'true' for tuples constructed
| 1366 | * -------------------------------- |
| 1367 | */ |
| 1368 | TupleTableSlot * |
| 1369 | ExecStoreHeapTuple(HeapTuple tuple, |
| 1370 | TupleTableSlot *slot, |
| 1371 | bool shouldFree) |
| 1372 | { |
| 1373 | /* |
| 1374 | * sanity checks |
| 1375 | */ |
| 1376 | Assert(tuple != NULL); |
| 1377 | Assert(slot != NULL); |
| 1378 | Assert(slot->tts_tupleDescriptor != NULL); |
| 1379 | |
| 1380 | if (unlikely(!TTS_IS_HEAPTUPLE(slot))) |
| 1381 | elog(ERROR, "trying to store a heap tuple into wrong type of slot"); |
| 1382 | tts_heap_store_tuple(slot, tuple, shouldFree); |
| 1383 | |
| 1384 | slot->tts_tableOid = tuple->t_tableOid; |
| 1385 | |
| 1386 | return slot; |
| 1387 | } |
| 1388 | |
| 1389 | /* -------------------------------- |
| 1390 | * ExecStoreBufferHeapTuple |
no test coverage detected