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

Function dumpAgg

src/bin/pg_dump/pg_dump.c:15478–15861  ·  view source on GitHub ↗

* dumpAgg * write out a single aggregate definition */

Source from the content-addressed store, hash-verified

15476 * write out a single aggregate definition
15477 */
15478static void
15479dumpAgg(Archive *fout, const AggInfo *agginfo)
15480{
15481 DumpOptions *dopt = fout->dopt;
15482 PQExpBuffer query;
15483 PQExpBuffer q;
15484 PQExpBuffer delq;
15485 PQExpBuffer details;
15486 char *aggsig; /* identity signature */
15487 char *aggfullsig = NULL; /* full signature */
15488 char *aggsig_tag;
15489 PGresult *res;
15490 int i_agginitval;
15491 int i_aggminitval;
15492 const char *aggtransfn;
15493 const char *aggfinalfn;
15494 const char *aggcombinefn;
15495 const char *aggserialfn;
15496 const char *aggdeserialfn;
15497 const char *aggmtransfn;
15498 const char *aggminvtransfn;
15499 const char *aggmfinalfn;
15500 bool aggfinalextra;
15501 bool aggmfinalextra;
15502 char aggfinalmodify;
15503 char aggmfinalmodify;
15504 const char *aggsortop;
15505 char *aggsortconvop;
15506 char aggkind;
15507 const char *aggtranstype;
15508 const char *aggtransspace;
15509 const char *aggmtranstype;
15510 const char *aggmtransspace;
15511 const char *agginitval;
15512 const char *aggminitval;
15513 bool aggrepsafeexec;
15514 const char *proparallel;
15515 char defaultfinalmodify;
15516
15517 /* Skip if not to be dumped */
15518 if (!agginfo->aggfn.dobj.dump || dopt->dataOnly)
15519 return;
15520
15521 query = createPQExpBuffer();
15522 q = createPQExpBuffer();
15523 delq = createPQExpBuffer();
15524 details = createPQExpBuffer();
15525
15526
15527 /*
15528 * GPDB_14_MERGE_FIXME:
15529 * Some fields:
15530 * aggcombinefn, aggserialfn,
15531 * aggdeserialfn, aggmtransfn,
15532 * aggminvtransfn, aggmfinalfn,
15533 * aggmtranstype::pg_catalog.regtype, aggfinalextra,
15534 * aggmfinalextra,
15535 * diffs from upsreaam in certain versions between [80100, 90600].

Callers 1

dumpDumpableObjectFunction · 0.85

Calls 15

createPQExpBufferFunction · 0.85
appendPQExpBufferStrFunction · 0.85
appendPQExpBufferFunction · 0.85
PQfnumberFunction · 0.85
PQgetvalueFunction · 0.85
PQgetisnullFunction · 0.85
getFormattedOperatorNameFunction · 0.85
fmtIdFunction · 0.85

Tested by

no test coverage detected