/*
* Return the next tuple.
*/
- ExecStoreTuple(fsstate->tuples[fsstate->next_tuple++],
- slot,
- InvalidBuffer,
- false);
+ ExecStoreHeapTuple(fsstate->tuples[fsstate->next_tuple++],
+ slot,
+ false);
return slot;
}
NULL,
fmstate->temp_cxt);
/* tuple will be deleted when it is cleared from the slot */
- ExecStoreTuple(newtup, slot, InvalidBuffer, true);
+ ExecStoreHeapTuple(newtup, slot, true);
}
PG_CATCH();
{
dmstate->retrieved_attrs,
node,
dmstate->temp_cxt);
- ExecStoreTuple(newtup, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(newtup, slot, false);
}
PG_CATCH();
{
int i;
ResetExprContext(econtext);
- ExecStoreTuple(oldtup, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(oldtup, slot, false);
FormIndexDatum(indexInfo,
slot,
estate,
old_values,
old_isnull);
- ExecStoreTuple(newtup, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(newtup, slot, false);
FormIndexDatum(indexInfo,
slot,
estate,
MemoryContextReset(econtext->ecxt_per_tuple_memory);
/* Set up for predicate or expression evaluation */
- ExecStoreTuple(heapTuple, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(heapTuple, slot, false);
/*
* In a partial index, discard tuples that don't satisfy the
MemoryContextReset(econtext->ecxt_per_tuple_memory);
/* Set up for predicate or expression evaluation */
- ExecStoreTuple(heapTuple, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(heapTuple, slot, false);
/*
* In a partial index, ignore tuples that don't satisfy the predicate.
MemoryContextReset(econtext->ecxt_per_tuple_memory);
/* Set up for predicate or expression evaluation */
- ExecStoreTuple(heapTuple, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(heapTuple, slot, false);
/*
* In a partial index, discard tuples that don't satisfy the
/* Need a slot to hold the tuple being examined */
slot = MakeSingleTupleTableSlot(RelationGetDescr(heapRelation));
- ExecStoreTuple(heapTuple, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(heapTuple, slot, false);
/*
* for each index, form and insert the index tuple
ResetExprContext(econtext);
/* Set up for predicate or expression evaluation */
- ExecStoreTuple(heapTuple, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(heapTuple, slot, false);
/* If index is partial, check predicate */
if (predicate != NULL)
*/
slot = MakeSingleTupleTableSlot(RelationGetDescr(trigdata->tg_relation));
- ExecStoreTuple(new_row, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(new_row, slot, false);
/*
* Typically the index won't have expressions, but if it does we need an
/* Place tuple in tuple slot --- but slot shouldn't free it */
slot = myslot;
- ExecStoreTuple(tuple, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(tuple, slot, false);
/* Determine the partition to heap_insert the tuple into */
if (proute)
List *recheckIndexes;
cstate->cur_lineno = firstBufferedLineNo + i;
- ExecStoreTuple(bufferedTuples[i], myslot, InvalidBuffer, false);
+ ExecStoreHeapTuple(bufferedTuples[i], myslot, false);
recheckIndexes =
ExecInsertIndexTuples(myslot, &(bufferedTuples[i]->t_self),
estate, false, NULL, NIL);
rettupdata.t_tableOid = InvalidOid;
rettupdata.t_data = td;
- slot = ExecStoreTuple(&rettupdata, tstate->slot, InvalidBuffer, false);
+ slot = ExecStoreHeapTuple(&rettupdata, tstate->slot, false);
tstate->dest->receiveSlot(slot, tstate->dest);
end_tup_output(tstate);
* Process supplied expressions to replace selected columns.
* Expression inputs come from the old tuple.
*/
- ExecStoreTuple(tuple, oldslot, InvalidBuffer, false);
+ ExecStoreHeapTuple(tuple, oldslot, false);
econtext->ecxt_scantuple = oldslot;
foreach(l, tab->newvals)
}
/* Now check any constraints on the possibly-changed tuple */
- ExecStoreTuple(tuple, newslot, InvalidBuffer, false);
+ ExecStoreHeapTuple(tuple, newslot, false);
econtext->ecxt_scantuple = newslot;
foreach(l, notnull_attrs)
while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL)
{
- ExecStoreTuple(tuple, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(tuple, slot, false);
if (!ExecCheck(exprstate, econtext))
ereport(ERROR,
if (newslot->tts_tupleDescriptor != tupdesc)
ExecSetSlotDescriptor(newslot, tupdesc);
- ExecStoreTuple(newtuple, newslot, InvalidBuffer, false);
+ ExecStoreHeapTuple(newtuple, newslot, false);
slot = newslot;
}
return slot;
if (newslot->tts_tupleDescriptor != tupdesc)
ExecSetSlotDescriptor(newslot, tupdesc);
- ExecStoreTuple(newtuple, newslot, InvalidBuffer, false);
+ ExecStoreHeapTuple(newtuple, newslot, false);
slot = newslot;
}
return slot;
if (newslot->tts_tupleDescriptor != tupdesc)
ExecSetSlotDescriptor(newslot, tupdesc);
- ExecStoreTuple(newtuple, newslot, InvalidBuffer, false);
+ ExecStoreHeapTuple(newtuple, newslot, false);
slot = newslot;
}
return slot;
if (newslot->tts_tupleDescriptor != tupdesc)
ExecSetSlotDescriptor(newslot, tupdesc);
- ExecStoreTuple(newtuple, newslot, InvalidBuffer, false);
+ ExecStoreHeapTuple(newtuple, newslot, false);
slot = newslot;
}
return slot;
oldslot = estate->es_trig_oldtup_slot;
if (oldslot->tts_tupleDescriptor != tupdesc)
ExecSetSlotDescriptor(oldslot, tupdesc);
- ExecStoreTuple(oldtup, oldslot, InvalidBuffer, false);
+ ExecStoreHeapTuple(oldtup, oldslot, false);
}
if (HeapTupleIsValid(newtup))
{
newslot = estate->es_trig_newtup_slot;
if (newslot->tts_tupleDescriptor != tupdesc)
ExecSetSlotDescriptor(newslot, tupdesc);
- ExecStoreTuple(newtup, newslot, InvalidBuffer, false);
+ ExecStoreHeapTuple(newtup, newslot, false);
}
/*
* Extract the index column values and isnull flags from the existing
* tuple.
*/
- ExecStoreTuple(tup, existing_slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(tup, existing_slot, false);
FormIndexDatum(indexInfo, existing_slot, estate,
existing_values, existing_isnull);
{
tuple = do_convert_tuple(tuple, map);
ExecSetSlotDescriptor(slot, tupdesc);
- ExecStoreTuple(tuple, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(tuple, slot, false);
}
}
{
tuple = do_convert_tuple(tuple, map);
ExecSetSlotDescriptor(slot, tupdesc);
- ExecStoreTuple(tuple, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(tuple, slot, false);
}
}
{
tuple = do_convert_tuple(tuple, map);
ExecSetSlotDescriptor(slot, tupdesc);
- ExecStoreTuple(tuple, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(tuple, slot, false);
}
}
{
tuple = do_convert_tuple(tuple, map);
ExecSetSlotDescriptor(slot, tupdesc);
- ExecStoreTuple(tuple, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(tuple, slot, false);
}
}
if (myslot != NULL && map != NULL)
{
tuple = do_convert_tuple(tuple, map);
- ExecStoreTuple(tuple, myslot, InvalidBuffer, true);
+ ExecStoreHeapTuple(tuple, myslot, true);
slot = myslot;
}
*p_my_slot = new_slot;
Assert(new_slot != NULL);
ExecSetSlotDescriptor(new_slot, map->outdesc);
- ExecStoreTuple(tuple, new_slot, InvalidBuffer, shouldFree);
+ ExecStoreHeapTuple(tuple, new_slot, shouldFree);
return tuple;
}
if ((scantuple = index_getnext(scan, ForwardScanDirection)) != NULL)
{
found = true;
- ExecStoreTuple(scantuple, outslot, InvalidBuffer, false);
+ ExecStoreHeapTuple(scantuple, outslot, false);
ExecMaterializeSlot(outslot);
xwait = TransactionIdIsValid(snap.xmin) ?
continue;
found = true;
- ExecStoreTuple(scantuple, outslot, InvalidBuffer, false);
+ ExecStoreHeapTuple(scantuple, outslot, false);
ExecMaterializeSlot(outslot);
xwait = TransactionIdIsValid(snap.xmin) ?
return ExecClearTuple(slot);
/* Store test tuple in the plan node's scan slot */
- ExecStoreTuple(estate->es_epqTuple[scanrelid - 1],
- slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(estate->es_epqTuple[scanrelid - 1],
+ slot, false);
/* Check if it meets the access-method conditions */
if (!(*recheckMtd) (node, slot))
*
* During ExecutorRun()
* ----------------
- * - SeqNext() calls ExecStoreTuple() to place the tuple returned
- * by the access methods into the scan tuple slot.
+ * - SeqNext() calls ExecStoreBufferHeapTuple() to place the tuple
+ * returned by the access methods into the scan tuple slot.
*
- * - ExecSeqScan() calls ExecStoreTuple() to take the result
+ * - ExecSeqScan() calls ExecStoreHeapTuple() to take the result
* tuple from ExecProject() and place it into the result tuple slot.
*
* - ExecutePlan() calls the output function.
}
/* --------------------------------
- * ExecStoreTuple
+ * ExecStoreHeapTuple
*
- * This function is used to store a physical tuple into a specified
+ * 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: slot to store it in
- * buffer: disk buffer if tuple is in a disk page, else InvalidBuffer
* shouldFree: true if ExecClearTuple should pfree() the tuple
* when done with it
*
- * If 'buffer' is not InvalidBuffer, the tuple table code acquires a pin
- * on the buffer which is held until the slot is cleared, so that the tuple
- * won't go away on us.
+ * shouldFree is normally set 'true' for tuples constructed on-the-fly. But it
+ * can be 'false' when the referenced tuple is held in a tuple table slot
+ * belonging to a lower-level executor Proc node. In this case the lower-level
+ * slot retains ownership and responsibility for eventually releasing the
+ * tuple. When this method is used, we must be certain that the upper-level
+ * Proc node will lose interest in the tuple sooner than the lower-level one
+ * does! If you're not certain, copy the lower-level tuple with heap_copytuple
+ * and let the upper-level table slot assume ownership of the copy!
*
- * shouldFree is normally set 'true' for tuples constructed on-the-fly.
- * It must always be 'false' for tuples that are stored in disk pages,
- * since we don't want to try to pfree those.
+ * Return value is just the passed-in slot pointer.
+ * --------------------------------
+ */
+TupleTableSlot *
+ExecStoreHeapTuple(HeapTuple tuple,
+ TupleTableSlot *slot,
+ bool shouldFree)
+{
+ /*
+ * sanity checks
+ */
+ Assert(tuple != NULL);
+ Assert(slot != NULL);
+ Assert(slot->tts_tupleDescriptor != NULL);
+
+ /*
+ * Free any old physical tuple belonging to the slot.
+ */
+ if (slot->tts_shouldFree)
+ heap_freetuple(slot->tts_tuple);
+ if (slot->tts_shouldFreeMin)
+ heap_free_minimal_tuple(slot->tts_mintuple);
+
+ /*
+ * Store the new tuple into the specified slot.
+ */
+ slot->tts_isempty = false;
+ slot->tts_shouldFree = shouldFree;
+ slot->tts_shouldFreeMin = false;
+ slot->tts_tuple = tuple;
+ slot->tts_mintuple = NULL;
+
+ /* Mark extracted state invalid */
+ slot->tts_nvalid = 0;
+
+ /* Unpin any buffer pinned by the slot. */
+ if (BufferIsValid(slot->tts_buffer))
+ ReleaseBuffer(slot->tts_buffer);
+ slot->tts_buffer = InvalidBuffer;
+
+ return slot;
+}
+
+/* --------------------------------
+ * ExecStoreBufferHeapTuple
*
- * Another case where it is 'false' is when the referenced tuple is held
- * in a tuple table slot belonging to a lower-level executor Proc node.
- * In this case the lower-level slot retains ownership and responsibility
- * for eventually releasing the tuple. When this method is used, we must
- * be certain that the upper-level Proc node will lose interest in the tuple
- * sooner than the lower-level one does! If you're not certain, copy the
- * lower-level tuple with heap_copytuple and let the upper-level table
- * slot assume ownership of the copy!
+ * This function is used to store an on-disk physical tuple from a buffer
+ * into a specified slot in the tuple table.
*
- * Return value is just the passed-in slot pointer.
+ * tuple: tuple to store
+ * slot: 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 which is held until the
+ * slot is cleared, so that the tuple won't go away on us.
*
- * NOTE: before PostgreSQL 8.1, this function would accept a NULL tuple
- * pointer and effectively behave like ExecClearTuple (though you could
- * still specify a buffer to pin, which would be an odd combination).
- * This saved a couple lines of code in a few places, but seemed more likely
- * to mask logic errors than to be really useful, so it's now disallowed.
+ * Return value is just the passed-in slot pointer.
* --------------------------------
*/
TupleTableSlot *
-ExecStoreTuple(HeapTuple tuple,
- TupleTableSlot *slot,
- Buffer buffer,
- bool shouldFree)
+ExecStoreBufferHeapTuple(HeapTuple tuple,
+ TupleTableSlot *slot,
+ Buffer buffer)
{
/*
* sanity checks
Assert(tuple != NULL);
Assert(slot != NULL);
Assert(slot->tts_tupleDescriptor != NULL);
- /* passing shouldFree=true for a tuple on a disk page is not sane */
- Assert(BufferIsValid(buffer) ? (!shouldFree) : true);
+ Assert(BufferIsValid(buffer));
/*
* Free any old physical tuple belonging to the slot.
* Store the new tuple into the specified slot.
*/
slot->tts_isempty = false;
- slot->tts_shouldFree = shouldFree;
+ slot->tts_shouldFree = false;
slot->tts_shouldFreeMin = false;
slot->tts_tuple = tuple;
slot->tts_mintuple = NULL;
slot->tts_nvalid = 0;
/*
- * If tuple is on a disk page, keep the page pinned as long as we hold a
- * pointer into it. We assume the caller already has such a pin.
+ * Keep the disk page containing the given tuple pinned as long as we hold
+ * a pointer into it. We assume the caller already has such a pin.
*
* This is coded to optimize the case where the slot previously held a
- * tuple on the same disk page: in that case releasing and re-acquiring
- * the pin is a waste of cycles. This is a common situation during
- * seqscans, so it's worth troubling over.
+ * tuple on the same disk page: in that case releasing and re-acquiring the
+ * pin is a waste of cycles. This is a common situation during seqscans,
+ * so it's worth troubling over.
*/
if (slot->tts_buffer != buffer)
{
if (BufferIsValid(slot->tts_buffer))
ReleaseBuffer(slot->tts_buffer);
slot->tts_buffer = buffer;
- if (BufferIsValid(buffer))
- IncrBufferRefCount(buffer);
+ IncrBufferRefCount(buffer);
}
return slot;
/* --------------------------------
* ExecStoreMinimalTuple
*
- * Like ExecStoreTuple, but insert a "minimal" tuple into the slot.
+ * Like ExecStoreHeapTuple, but insert a "minimal" tuple into the slot.
*
* No 'buffer' parameter since minimal tuples are never stored in relations.
* --------------------------------
tuple = heap_expand_tuple(slot->tts_tuple,
slot->tts_tupleDescriptor);
MemoryContextSwitchTo(oldContext);
- slot = ExecStoreTuple(tuple, slot, InvalidBuffer, true);
+ slot = ExecStoreHeapTuple(tuple, slot, true);
}
return slot->tts_tuple;
}
newTuple = ExecCopySlotTuple(srcslot);
MemoryContextSwitchTo(oldContext);
- return ExecStoreTuple(newTuple, dstslot, InvalidBuffer, true);
+ return ExecStoreHeapTuple(newTuple, dstslot, true);
}
* reserved for it. The tuple will be deleted when it is
* cleared from the slot.
*/
- ExecStoreTuple(aggstate->grp_firstTuple,
- firstSlot,
- InvalidBuffer,
- true);
+ ExecStoreHeapTuple(aggstate->grp_firstTuple,
+ firstSlot,
+ true);
aggstate->grp_firstTuple = NULL; /* don't keep two pointers */
/* set up for first advance_aggregates call */
* Set up the result slot to point to this tuple. Note that the
* slot acquires a pin on the buffer.
*/
- ExecStoreTuple(&scan->rs_ctup,
- slot,
- scan->rs_cbuf,
- false);
+ ExecStoreBufferHeapTuple(&scan->rs_ctup,
+ slot,
+ scan->rs_cbuf);
/*
* If we are using lossy info, we have to recheck the qual
if (HeapTupleIsValid(tup))
{
- ExecStoreTuple(tup, /* tuple to store */
- fslot, /* slot in which to store the tuple */
- InvalidBuffer, /* buffer associated with this
- * tuple */
- true); /* pfree tuple when done with it */
+ ExecStoreHeapTuple(tup, /* tuple to store */
+ fslot, /* slot to store the tuple */
+ true); /* pfree tuple when done with it */
return fslot;
}
}
Assert(HeapTupleIsValid(tup));
/* Build the TupleTableSlot for the given tuple */
- ExecStoreTuple(tup, /* tuple to store */
- gm_state->gm_slots[reader], /* slot in which to store the
- * tuple */
- InvalidBuffer, /* no buffer associated with tuple */
- true); /* pfree tuple when done with it */
+ ExecStoreHeapTuple(tup, /* tuple to store */
+ gm_state->gm_slots[reader], /* slot in which to store
+ * the tuple */
+ true); /* pfree tuple when done with it */
return true;
}
*/
Assert(slot->tts_tupleDescriptor->natts ==
scandesc->xs_hitupdesc->natts);
- ExecStoreTuple(scandesc->xs_hitup, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(scandesc->xs_hitup, slot, false);
}
else if (scandesc->xs_itup)
StoreIndexTuple(slot, scandesc->xs_itup, scandesc->xs_itupdesc);
* Note: we pass 'false' because tuples returned by amgetnext are
* pointers onto disk pages and must not be pfree()'d.
*/
- ExecStoreTuple(tuple, /* tuple to store */
- slot, /* slot to store in */
- scandesc->xs_cbuf, /* buffer containing tuple */
- false); /* don't pfree */
+ ExecStoreBufferHeapTuple(tuple, /* tuple to store */
+ slot, /* slot to store in */
+ scandesc->xs_cbuf); /* buffer containing
+ * tuple */
/*
* If the index was lossy, we have to recheck the index quals using
tuple = reorderqueue_pop(node);
/* Pass 'true', as the tuple in the queue is a palloc'd copy */
- ExecStoreTuple(tuple, slot, InvalidBuffer, true);
+ ExecStoreHeapTuple(tuple, slot, true);
return slot;
}
}
/*
* Store the scanned tuple in the scan tuple slot of the scan state.
- * Note: we pass 'false' because tuples returned by amgetnext are
- * pointers onto disk pages and must not be pfree()'d.
*/
- ExecStoreTuple(tuple, /* tuple to store */
- slot, /* slot to store in */
- scandesc->xs_cbuf, /* buffer containing tuple */
- false); /* don't pfree */
+ ExecStoreBufferHeapTuple(tuple, /* tuple to store */
+ slot, /* slot to store in */
+ scandesc->xs_cbuf); /* buffer containing
+ * tuple */
/*
* If the index was lossy, we have to recheck the index quals and
if (slot->tts_tupleDescriptor != RelationGetDescr(resultRelationDesc))
ExecSetSlotDescriptor(slot, RelationGetDescr(resultRelationDesc));
- ExecStoreTuple(&deltuple, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(&deltuple, slot, false);
}
rslot = ExecProcessReturning(resultRelInfo, slot, planSlot);
ExecCheckHeapTupleVisible(estate, &tuple, buffer);
/* Store target's existing tuple in the state's dedicated slot */
- ExecStoreTuple(&tuple, mtstate->mt_existing, buffer, false);
+ ExecStoreBufferHeapTuple(&tuple, mtstate->mt_existing, buffer);
/*
* Make tuple and any needed join variables available to ExecQual and
slot = node->ss.ss_ScanTupleSlot;
if (tuple)
- ExecStoreTuple(tuple, /* tuple to store */
- slot, /* slot to store in */
- node->ss.ss_currentScanDesc->rs_cbuf, /* tuple's buffer */
- false); /* don't pfree this pointer */
+ ExecStoreBufferHeapTuple(tuple, /* tuple to store */
+ slot, /* slot to store in */
+ node->ss.ss_currentScanDesc->rs_cbuf); /* tuple's buffer */
else
ExecClearTuple(slot);
* our scan tuple slot and return the slot. Note: we pass 'false' because
* tuples returned by heap_getnext() are pointers onto disk pages and were
* not created with palloc() and so should not be pfree()'d. Note also
- * that ExecStoreTuple will increment the refcount of the buffer; the
+ * that ExecStoreHeapTuple will increment the refcount of the buffer; the
* refcount will not be dropped until the tuple table slot is cleared.
*/
if (tuple)
- ExecStoreTuple(tuple, /* tuple to store */
- slot, /* slot to store in */
- scandesc->rs_cbuf, /* buffer associated with this
- * tuple */
- false); /* don't pfree this pointer */
+ ExecStoreBufferHeapTuple(tuple, /* tuple to store */
+ slot, /* slot to store in */
+ scandesc->rs_cbuf); /* buffer associated
+ * with this tuple */
else
ExecClearTuple(slot);
* for it. The tuple will be deleted when it is cleared from the
* slot.
*/
- ExecStoreTuple(setopstate->grp_firstTuple,
- resultTupleSlot,
- InvalidBuffer,
- true);
+ ExecStoreHeapTuple(setopstate->grp_firstTuple,
+ resultTupleSlot,
+ true);
setopstate->grp_firstTuple = NULL; /* don't keep two pointers */
/* Initialize working state for a new input tuple group */
if (heap_fetch(heapRelation, snapshot, tuple, &buffer, false, NULL))
{
/*
- * store the scanned tuple in the scan tuple slot of the scan
+ * Store the scanned tuple in the scan tuple slot of the scan
* state. Eventually we will only do this and not return a tuple.
- * Note: we pass 'false' because tuples returned by amgetnext are
- * pointers onto disk pages and were not created with palloc() and
- * so should not be pfree()'d.
*/
- ExecStoreTuple(tuple, /* tuple to store */
- slot, /* slot to store in */
- buffer, /* buffer associated with tuple */
- false); /* don't pfree */
+ ExecStoreBufferHeapTuple(tuple, /* tuple to store */
+ slot, /* slot to store in */
+ buffer); /* buffer associated with
+ * tuple */
/*
* At this point we have an extra pin on the buffer, because
- * ExecStoreTuple incremented the pin count. Drop our local pin.
+ * ExecStoreHeapTuple incremented the pin count. Drop our local
+ * pin.
*/
ReleaseBuffer(buffer);
while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL)
{
- ExecStoreTuple(tuple, tupslot, InvalidBuffer, false);
+ ExecStoreHeapTuple(tuple, tupslot, false);
econtext->ecxt_scantuple = tupslot;
if (!ExecCheck(partqualstate, econtext))
{
/* Process and store remote tuple in the slot */
oldctx = MemoryContextSwitchTo(GetPerTupleMemoryContext(estate));
- ExecStoreTuple(localslot->tts_tuple, remoteslot, InvalidBuffer, false);
+ ExecStoreHeapTuple(localslot->tts_tuple, remoteslot, false);
slot_modify_cstrings(remoteslot, rel, newtup.values, newtup.changed);
MemoryContextSwitchTo(oldctx);
indexscandir)) != NULL)
{
/* Extract the index column values from the heap tuple */
- ExecStoreTuple(tup, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(tup, slot, false);
FormIndexDatum(indexInfo, slot, estate,
values, isnull);
-indexscandir)) != NULL)
{
/* Extract the index column values from the heap tuple */
- ExecStoreTuple(tup, slot, InvalidBuffer, false);
+ ExecStoreHeapTuple(tup, slot, false);
FormIndexDatum(indexInfo, slot, estate,
values, isnull);
ecxt_scantuple = GetPerTupleExprContext(state->estate)->ecxt_scantuple;
- ExecStoreTuple(ltup, ecxt_scantuple, InvalidBuffer, false);
+ ExecStoreHeapTuple(ltup, ecxt_scantuple, false);
FormIndexDatum(state->indexInfo, ecxt_scantuple, state->estate,
l_index_values, l_index_isnull);
- ExecStoreTuple(rtup, ecxt_scantuple, InvalidBuffer, false);
+ ExecStoreHeapTuple(rtup, ecxt_scantuple, false);
FormIndexDatum(state->indexInfo, ecxt_scantuple, state->estate,
r_index_values, r_index_isnull);
extern TupleTableSlot *MakeSingleTupleTableSlot(TupleDesc tupdesc);
extern void ExecDropSingleTupleTableSlot(TupleTableSlot *slot);
extern void ExecSetSlotDescriptor(TupleTableSlot *slot, TupleDesc tupdesc);
-extern TupleTableSlot *ExecStoreTuple(HeapTuple tuple,
- TupleTableSlot *slot,
- Buffer buffer,
- bool shouldFree);
+extern TupleTableSlot *ExecStoreHeapTuple(HeapTuple tuple,
+ TupleTableSlot *slot,
+ bool shouldFree);
+extern TupleTableSlot *ExecStoreBufferHeapTuple(HeapTuple tuple,
+ TupleTableSlot *slot,
+ Buffer buffer);
extern TupleTableSlot *ExecStoreMinimalTuple(MinimalTuple mtup,
TupleTableSlot *slot,
bool shouldFree);