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

Function saveCdbStatMsg

src/interfaces/libpq/fe-protocol3.c:1751–1774  ·  view source on GitHub ↗

* saveCdbStatMsg - attach qExec statistics message to PGresult */

Source from the content-addressed store, hash-verified

1749 * saveCdbStatMsg - attach qExec statistics message to PGresult
1750 */
1751void
1752saveCdbStatMsg(PGresult *result, char *data, int len)
1753{
1754 pgCdbStatCell *cell;
1755
1756 /* Allocate list element. */
1757 cell = pqResultAlloc(result, sizeof(*cell), true);
1758 if (!cell)
1759 return;
1760
1761 /* Allocate an aligned buffer from the PGresult's memory pool. */
1762 cell->data = (char *)pqResultAlloc(result, len, true);
1763 if (!cell->data)
1764 return;
1765
1766 /* Copy the message data. */
1767 cell->len = len;
1768 memcpy(cell->data, data, len);
1769
1770 /* Add to head of list. */
1771 cell->next = result->cdbstats;
1772 result->cdbstats = cell;
1773 return;
1774} /* saveCdbStatMsg */
1775
1776
1777/*

Callers 2

pqParseInput3Function · 0.85
pqGetErrorNotice3Function · 0.85

Calls 1

pqResultAllocFunction · 0.85

Tested by

no test coverage detected