/*
* pqTraceOutputString: output a string message to the log
+ *
+ * If 'suppress' is true, print a literal "SSSS" instead of the actual string.
*/
static void
pqTraceOutputString(FILE *pfdebug, const char *data, int *cursor, bool suppress)
/*
* pqTraceOutputNchar: output a string of exactly len bytes message to the log
+ *
+ * If 'suppress' is true, print a literal 'BBBB' instead of the actual bytes.
*/
static void
-pqTraceOutputNchar(FILE *pfdebug, int len, const char *data, int *cursor)
+pqTraceOutputNchar(FILE *pfdebug, int len, const char *data, int *cursor, bool suppress)
{
int i,
next; /* first char not yet printed */
const char *v = data + *cursor;
+ if (suppress)
+ {
+ fprintf(pfdebug, " 'BBBB'");
+ *cursor += len;
+ return;
+ }
+
fprintf(pfdebug, " \'");
for (next = i = 0; i < len; ++i)
nbytes = pqTraceOutputInt32(f, message, cursor, false);
if (nbytes == -1)
continue;
- pqTraceOutputNchar(f, nbytes, message, cursor);
+ pqTraceOutputNchar(f, nbytes, message, cursor, false);
}
nparams = pqTraceOutputInt16(f, message, cursor);
len = pqTraceOutputInt32(f, message, cursor, false);
if (len == -1)
continue;
- pqTraceOutputNchar(f, len, message, cursor);
+ pqTraceOutputNchar(f, len, message, cursor, false);
}
}
nbytes = pqTraceOutputInt32(f, message, cursor, false);
if (nbytes == -1)
continue;
- pqTraceOutputNchar(f, nbytes, message, cursor);
+ pqTraceOutputNchar(f, nbytes, message, cursor, false);
}
pqTraceOutputInt16(f, message, cursor);
fprintf(f, "FunctionCallResponse\t");
len = pqTraceOutputInt32(f, message, cursor, false);
if (len != -1)
- pqTraceOutputNchar(f, len, message, cursor);
+ pqTraceOutputNchar(f, len, message, cursor, false);
}
static void