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

Function printTableAddFooter

src/fe_utils/print.c:3188–3202  ·  view source on GitHub ↗

* Add a footer to the table. * * Footers are added as elements of a singly-linked list, and the content is * strdup'd, so there is no need to keep the original footer string around. * * Footers are never translated by the function. If you want the footer * translated you must do so yourself, before calling printTableAddFooter. The * reason this works differently to headers and cells is th

Source from the content-addressed store, hash-verified

3186 * translated as a whole.
3187 */
3188void
3189printTableAddFooter(printTableContent *const content, const char *footer)
3190{
3191 printTableFooter *f;
3192
3193 f = pg_malloc0(sizeof(*f));
3194 f->data = pg_strdup(footer);
3195
3196 if (content->footers == NULL)
3197 content->footers = f;
3198 else
3199 content->footer->next = f;
3200
3201 content->footer = f;
3202}
3203
3204/*
3205 * Change the content of the last-added footer.

Callers 8

printTableSetFooterFunction · 0.85
printQueryFunction · 0.85
describeOneTableDetailsFunction · 0.85
add_partition_by_footerFunction · 0.85
add_tablespace_footerFunction · 0.85
describePublicationsFunction · 0.85

Calls 2

pg_malloc0Function · 0.85
pg_strdupFunction · 0.85

Tested by

no test coverage detected