MCPcopy Create free account
hub / github.com/apache/cloudberry / slot_getsysattr

Function slot_getsysattr

src/include/executor/tuptable.h:403–421  ·  view source on GitHub ↗

* slot_getsysattr - fetch a system attribute of the slot's current tuple. * * If the slot type does not contain system attributes, this will throw an * error. Hence before calling this function, callers should make sure that * the slot type is the one that supports system attributes. */

Source from the content-addressed store, hash-verified

401 * the slot type is the one that supports system attributes.
402 */
403static inline Datum
404slot_getsysattr(TupleTableSlot *slot, int attnum, bool *isnull)
405{
406 AssertArg(attnum < 0); /* caller error */
407
408 if (attnum == TableOidAttributeNumber)
409 {
410 *isnull = false;
411 return ObjectIdGetDatum(slot->tts_tableOid);
412 }
413 else if (attnum == SelfItemPointerAttributeNumber)
414 {
415 *isnull = false;
416 return PointerGetDatum(&slot->tts_tid);
417 }
418
419 /* Fetch the system attribute from the underlying tuple. */
420 return slot->tts_ops->getsysattr(slot, attnum, isnull);
421}
422
423/*
424 * ExecClearTuple - clear the slot's contents

Callers 6

ExecCheckTupleVisibleFunction · 0.85
ExecOnConflictUpdateFunction · 0.85
getCurrentOfFunction · 0.85
ExecEvalSysVarFunction · 0.85
FormIndexDatumFunction · 0.85

Calls 1

ObjectIdGetDatumFunction · 0.85

Tested by

no test coverage detected