* 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.) */
| 659 | * keep this file free of assumptions about how to deal with SQL errors.) |
| 660 | */ |
| 661 | void |
| 662 | buildShSecLabelQuery(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 |
no test coverage detected