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

Function buildShSecLabels

src/bin/pg_dump/pg_dumpall.c:2456–2470  ·  view source on GitHub ↗

* buildShSecLabels * * Build SECURITY LABEL command(s) for a shared object * * The caller has to provide object type and identity in two separate formats: * catalog_name (e.g., "pg_database") and object OID, as well as * type name (e.g., "DATABASE") and object name (not pre-quoted). * * The command(s) are appended to "buffer". */

Source from the content-addressed store, hash-verified

2454 * The command(s) are appended to "buffer".
2455 */
2456static void
2457buildShSecLabels(PGconn *conn, const char *catalog_name, Oid objectId,
2458 const char *objtype, const char *objname,
2459 PQExpBuffer buffer)
2460{
2461 PQExpBuffer sql = createPQExpBuffer();
2462 PGresult *res;
2463
2464 buildShSecLabelQuery(catalog_name, objectId, sql);
2465 res = executeQuery(conn, sql->data);
2466 emitShSecLabels(conn, res, buffer, objtype, objname);
2467
2468 PQclear(res);
2469 destroyPQExpBuffer(sql);
2470}
2471
2472/*
2473 * Make a database connection with the given parameters. An

Callers 3

dumpRolesFunction · 0.85
dumpTablespacesFunction · 0.85
dumpTagsFunction · 0.85

Calls 6

createPQExpBufferFunction · 0.85
buildShSecLabelQueryFunction · 0.85
emitShSecLabelsFunction · 0.85
PQclearFunction · 0.85
destroyPQExpBufferFunction · 0.85
executeQueryFunction · 0.70

Tested by

no test coverage detected