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

Function format_function_arguments

src/bin/pg_dump/pg_dump.c:13127–13139  ·  view source on GitHub ↗

* format_function_arguments: generate function name and argument list * * This is used when we can rely on pg_get_function_arguments to format * the argument list. Note, however, that pg_get_function_arguments * does not special-case zero-argument aggregates. */

Source from the content-addressed store, hash-verified

13125 * does not special-case zero-argument aggregates.
13126 */
13127static char *
13128format_function_arguments(const FuncInfo *finfo, const char *funcargs, bool is_agg)
13129{
13130 PQExpBufferData fn;
13131
13132 initPQExpBuffer(&fn);
13133 appendPQExpBufferStr(&fn, fmtId(finfo->dobj.name));
13134 if (is_agg && finfo->nargs == 0)
13135 appendPQExpBufferStr(&fn, "(*)");
13136 else
13137 appendPQExpBuffer(&fn, "(%s)", funcargs);
13138 return fn.data;
13139}
13140
13141/*
13142 * format_function_arguments_old: generate function name and argument list

Callers 2

dumpFuncFunction · 0.85
dumpAggFunction · 0.85

Calls 4

initPQExpBufferFunction · 0.85
appendPQExpBufferStrFunction · 0.85
fmtIdFunction · 0.85
appendPQExpBufferFunction · 0.85

Tested by

no test coverage detected