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

Function buildShSecLabelQuery

src/bin/pg_dump/dumputils.c:661–669  ·  view source on GitHub ↗

* buildShSecLabelQuery * * Build a query to retrieve security labels for a shared object. * The object is identified by its OID plus the name of the catalog * it can be found in (e.g., "pg_database" for database names). * The query is appended to "sql". (We don't execute it here so as to * keep this file free of assumptions about how to deal with SQL errors.) */

Source from the content-addressed store, hash-verified

659 * keep this file free of assumptions about how to deal with SQL errors.)
660 */
661void
662buildShSecLabelQuery(const char *catalog_name, Oid objectId,
663 PQExpBuffer sql)
664{
665 appendPQExpBuffer(sql,
666 "SELECT provider, label FROM pg_catalog.pg_shseclabel "
667 "WHERE classoid = 'pg_catalog.%s'::pg_catalog.regclass "
668 "AND objoid = '%u'", catalog_name, objectId);
669}
670
671/*
672 * emitShSecLabels

Callers 2

buildShSecLabelsFunction · 0.85
dumpDatabaseFunction · 0.85

Calls 1

appendPQExpBufferFunction · 0.85

Tested by

no test coverage detected