* Store a MinimalTuple into any kind of slot, performing conversion if * necessary. */
| 1526 | * necessary. |
| 1527 | */ |
| 1528 | void |
| 1529 | ExecForceStoreMinimalTuple(MinimalTuple mtup, |
| 1530 | TupleTableSlot *slot, |
| 1531 | bool shouldFree) |
| 1532 | { |
| 1533 | if (TTS_IS_MINIMALTUPLE(slot)) |
| 1534 | { |
| 1535 | tts_minimal_store_tuple(slot, mtup, shouldFree); |
| 1536 | } |
| 1537 | else |
| 1538 | { |
| 1539 | HeapTupleData htup; |
| 1540 | |
| 1541 | ExecClearTuple(slot); |
| 1542 | |
| 1543 | htup.t_len = mtup->t_len + MINIMAL_TUPLE_OFFSET; |
| 1544 | htup.t_data = (HeapTupleHeader) ((char *) mtup - MINIMAL_TUPLE_OFFSET); |
| 1545 | heap_deform_tuple(&htup, slot->tts_tupleDescriptor, |
| 1546 | slot->tts_values, slot->tts_isnull); |
| 1547 | ExecStoreVirtualTuple(slot); |
| 1548 | |
| 1549 | if (shouldFree) |
| 1550 | { |
| 1551 | ExecMaterializeSlot(slot); |
| 1552 | pfree(mtup); |
| 1553 | } |
| 1554 | } |
| 1555 | } |
| 1556 | |
| 1557 | /* -------------------------------- |
| 1558 | * ExecStoreVirtualTuple |
no test coverage detected