| 66 | |
| 67 | #ifdef CDB_MOTION_DEBUG |
| 68 | static void |
| 69 | formatTuple(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 | /* ---------------------------------------------------------------- |
no test coverage detected