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

Function formatTuple

src/backend/executor/nodeMotion.c:68–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67#ifdef CDB_MOTION_DEBUG
68static void
69formatTuple(StringInfo buf, TupleTableSlot *slot, Oid *outputFunArray)
70{
71 TupleDesc tupdesc = slot->tts_tupleDescriptor;
72 int i;
73
74 for (i = 0; i < tupdesc->natts; i++)
75 {
76 bool isnull;
77 Datum d = slot_getattr(slot, i + 1, &isnull);
78
79 if (d && !isnull)
80 {
81 char *s = OidOutputFunctionCall(outputFunArray[i], d);
82 char *name = NameStr(tupdesc->attrs[i].attname);
83
84 if (name && *name)
85 appendStringInfo(buf, " %s=\"%.30s\"", name, s);
86 else
87 appendStringInfo(buf, " \"%.30s\"", s);
88 pfree(s);
89 }
90 }
91 appendStringInfoChar(buf, '\n');
92}
93#endif
94
95/* ----------------------------------------------------------------

Callers 3

execMotionSortedReceiverFunction · 0.85
doSendTupleFunction · 0.85

Calls 5

slot_getattrFunction · 0.85
OidOutputFunctionCallFunction · 0.85
appendStringInfoFunction · 0.85
appendStringInfoCharFunction · 0.85
pfreeFunction · 0.50

Tested by

no test coverage detected