static TupleDesc ExecTypeFromTLInternal(List *targetList,
bool skipjunk);
-static pg_attribute_always_inline void
-slot_deform_heap_tuple(TupleTableSlot *slot, HeapTuple tuple, uint32 *offp,
+static pg_attribute_always_inline void slot_deform_heap_tuple(TupleTableSlot *slot, HeapTuple tuple, uint32 *offp,
int natts);
static inline void tts_buffer_heap_store_tuple(TupleTableSlot *slot,
- HeapTuple tuple,
- Buffer buffer,
- bool transfer_pin);
+ HeapTuple tuple,
+ Buffer buffer,
+ bool transfer_pin);
static void tts_heap_store_tuple(TupleTableSlot *slot, HeapTuple tuple, bool shouldFree);
{
elog(ERROR, "virtual tuple table slot does not have system attributes");
- return 0; /* silence compiler warnings */
+ return 0; /* silence compiler warnings */
}
/*
for (int natt = 0; natt < desc->natts; natt++)
{
Form_pg_attribute att = TupleDescAttr(desc, natt);
- Datum val;
+ Datum val;
if (att->attbyval || slot->tts_isnull[natt])
continue;
for (int natt = 0; natt < desc->natts; natt++)
{
Form_pg_attribute att = TupleDescAttr(desc, natt);
- Datum val;
+ Datum val;
if (att->attbyval || slot->tts_isnull[natt])
continue;
if (att->attlen == -1 &&
VARATT_IS_EXTERNAL_EXPANDED(DatumGetPointer(val)))
{
- Size data_length;
+ Size data_length;
/*
* We want to flatten the expanded value so that the materialized
}
else
{
- Size data_length = 0;
+ Size data_length = 0;
data = (char *) att_align_nominal(data, att->attalign);
data_length = att_addlength_datum(data_length, att->attlen, val);
static void
tts_heap_copyslot(TupleTableSlot *dstslot, TupleTableSlot *srcslot)
{
- HeapTuple tuple;
+ HeapTuple tuple;
MemoryContext oldcontext;
oldcontext = MemoryContextSwitchTo(dstslot->tts_mcxt);
{
elog(ERROR, "minimal tuple table slot does not have system attributes");
- return 0; /* silence compiler warnings */
+ return 0; /* silence compiler warnings */
}
static void
MakeTupleTableSlot(TupleDesc tupleDesc,
const TupleTableSlotOps *tts_ops)
{
- Size basesz, allocsz;
+ Size basesz,
+ allocsz;
TupleTableSlot *slot;
+
basesz = tts_ops->base_slot_size;
/*
slot_getsomeattrs_int(TupleTableSlot *slot, int attnum)
{
/* Check for caller errors */
- Assert(slot->tts_nvalid < attnum); /* slot_getsomeattr checked */
+ Assert(slot->tts_nvalid < attnum); /* slot_getsomeattr checked */
Assert(attnum > 0);
if (unlikely(attnum > slot->tts_tupleDescriptor->natts))
slot->tts_ops->getsomeattrs(slot, attnum);
/*
- * If the underlying tuple doesn't have enough attributes, tuple descriptor
- * must have the missing attributes.
+ * If the underlying tuple doesn't have enough attributes, tuple
+ * descriptor must have the missing attributes.
*/
if (unlikely(slot->tts_nvalid < attnum))
{