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

Function printTableSetFooter

src/fe_utils/print.c:3213–3223  ·  view source on GitHub ↗

* Change the content of the last-added footer. * * The current contents of the last-added footer are freed, and replaced by the * content given in *footer. If there was no previous footer, add a new one. * * The content is strdup'd, so there is no need to keep the original string * around. */

Source from the content-addressed store, hash-verified

3211 * around.
3212 */
3213void
3214printTableSetFooter(printTableContent *const content, const char *footer)
3215{
3216 if (content->footers != NULL)
3217 {
3218 free(content->footer->data);
3219 content->footer->data = pg_strdup(footer);
3220 }
3221 else
3222 printTableAddFooter(content, footer);
3223}
3224
3225/*
3226 * Free all memory allocated to this struct.

Callers 1

add_tablespace_footerFunction · 0.85

Calls 2

pg_strdupFunction · 0.85
printTableAddFooterFunction · 0.85

Tested by

no test coverage detected