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

Function printfPQExpBuffer

src/interfaces/libpq/pqexpbuffer.c:243–263  ·  view source on GitHub ↗

* printfPQExpBuffer * Format text data under the control of fmt (an sprintf-like format string) * and insert it into str. More space is allocated to str if necessary. * This is a convenience routine that does the same thing as * resetPQExpBuffer() followed by appendPQExpBuffer(). */

Source from the content-addressed store, hash-verified

241 * resetPQExpBuffer() followed by appendPQExpBuffer().
242 */
243void
244printfPQExpBuffer(PQExpBuffer str, const char *fmt,...)
245{
246 int save_errno = errno;
247 va_list args;
248 bool done;
249
250 resetPQExpBuffer(str);
251
252 if (PQExpBufferBroken(str))
253 return; /* already failed */
254
255 /* Loop in case we have to retry after enlarging the buffer. */
256 do
257 {
258 errno = save_errno;
259 va_start(args, fmt);
260 done = appendPQExpBufferVA(str, fmt, args);
261 va_end(args);
262 } while (!done);
263}
264
265/*
266 * appendPQExpBuffer

Callers 15

PQsendGpQuery_sharedFunction · 0.85
lo_import_internalFunction · 0.85
lo_exportFunction · 0.85
pqWaitTimeoutFunction · 0.85
describeAggregatesFunction · 0.85
describeAccessMethodsFunction · 0.85
describeTablespacesFunction · 0.85
describeFunctionsFunction · 0.85
describeTypesFunction · 0.85
describeOperatorsFunction · 0.85
listAllDbsFunction · 0.85
permissionsListFunction · 0.85

Calls 2

resetPQExpBufferFunction · 0.85
appendPQExpBufferVAFunction · 0.85

Tested by

no test coverage detected