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

Function format_function_signature

src/bin/pg_dump/pg_dump.c:13292–13314  ·  view source on GitHub ↗

* format_function_signature: generate function name and argument list * * This is like format_function_arguments_old except that only a minimal * list of input argument types is generated; this is sufficient to * reference the function, but not to define it. * * If honor_quotes is false then the function name is never quoted. * This is appropriate for use in TOC tags, but not in SQL command

Source from the content-addressed store, hash-verified

13290 * This is appropriate for use in TOC tags, but not in SQL commands.
13291 */
13292static char *
13293format_function_signature(Archive *fout, const FuncInfo *finfo, bool honor_quotes)
13294{
13295 PQExpBufferData fn;
13296 int j;
13297
13298 initPQExpBuffer(&fn);
13299 if (honor_quotes)
13300 appendPQExpBuffer(&fn, "%s(", fmtId(finfo->dobj.name));
13301 else
13302 appendPQExpBuffer(&fn, "%s(", finfo->dobj.name);
13303 for (j = 0; j < finfo->nargs; j++)
13304 {
13305 if (j > 0)
13306 appendPQExpBufferStr(&fn, ", ");
13307
13308 appendPQExpBufferStr(&fn,
13309 getFormattedTypeName(fout, finfo->argtypes[j],
13310 zeroIsError));
13311 }
13312 appendPQExpBufferChar(&fn, ')');
13313 return fn.data;
13314}
13315
13316
13317/*

Callers 4

dumpFuncFunction · 0.85
dumpCastFunction · 0.85
dumpTransformFunction · 0.85
dumpAggFunction · 0.85

Calls 6

initPQExpBufferFunction · 0.85
appendPQExpBufferFunction · 0.85
fmtIdFunction · 0.85
appendPQExpBufferStrFunction · 0.85
getFormattedTypeNameFunction · 0.85
appendPQExpBufferCharFunction · 0.85

Tested by

no test coverage detected