25 #include "utils/fmgroids.h"
60 Anum_pg_namespace_oid,
68 elog(
ERROR,
"could not find tuple for namespace %u", namespaceId);
71 nsp_name =
NameStr(nspForm->nspname);
72 if (strncmp(nsp_name,
"pg_temp_", 8) == 0)
74 else if (strncmp(nsp_name,
"pg_toast_temp_", 14) == 0)
75 nsp_name =
"pg_toast_temp";
99 object.classId = NamespaceRelationId;
100 object.objectId = namespaceId;
101 object.objectSubId = 0;
122 object.
classId = NamespaceRelationId;
123 object.objectId = namespaceId;
124 object.objectSubId = 0;
147 object.
classId = NamespaceRelationId;
148 object.objectId = namespaceId;
149 object.objectSubId = 0;
185 object.
classId = NamespaceRelationId;
186 object.objectId = namespaceId;
187 object.objectSubId = 0;
void systable_endscan(SysScanDesc sysscan)
HeapTuple systable_getnext(SysScanDesc sysscan)
SysScanDesc systable_beginscan(Relation heapRelation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, ScanKey key)
#define HeapTupleIsValid(tuple)
char * sepgsql_get_label(Oid classId, Oid objectId, int32 subId)
char * sepgsql_get_client_label(void)
void pfree(void *pointer)
char * getObjectIdentity(const ObjectAddress *object, bool missing_ok)
FormData_pg_namespace * Form_pg_namespace
static Datum ObjectIdGetDatum(Oid X)
const char * quote_identifier(const char *ident)
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
void sepgsql_schema_post_create(Oid namespaceId)
void sepgsql_schema_setattr(Oid namespaceId)
void sepgsql_schema_rename(Oid namespaceId)
void sepgsql_schema_remove_name(Oid namespaceId)
void sepgsql_schema_add_name(Oid namespaceId)
void sepgsql_schema_relabel(Oid namespaceId, const char *seclabel)
bool sepgsql_schema_search(Oid namespaceId, bool abort_on_violation)
void sepgsql_schema_drop(Oid namespaceId)
static bool check_schema_perms(Oid namespaceId, uint32 required, bool abort_on_violation)
void SetSecurityLabel(const ObjectAddress *object, const char *provider, const char *label)
char * sepgsql_compute_create(const char *scontext, const char *tcontext, uint16 tclass, const char *objname)
#define SEPG_DB_SCHEMA__DROP
#define SEPG_CLASS_DB_SCHEMA
#define SEPG_DB_SCHEMA__SETATTR
#define SEPG_DB_SCHEMA__CREATE
#define SEPG_DB_SCHEMA__REMOVE_NAME
bool sepgsql_avc_check_perms_label(const char *tcontext, uint16 tclass, uint32 required, const char *audit_name, bool abort_on_violation)
#define SEPG_DB_SCHEMA__ADD_NAME
#define SEPG_DB_SCHEMA__RELABELFROM
#define SEPG_DB_SCHEMA__SEARCH
#define SEPGSQL_LABEL_TAG
#define SEPG_DB_SCHEMA__RELABELTO
bool sepgsql_avc_check_perms(const ObjectAddress *tobject, uint16 tclass, uint32 required, const char *audit_name, bool abort_on_violation)
#define BTEqualStrategyNumber
void appendStringInfoString(StringInfo str, const char *s)
void initStringInfo(StringInfo str)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)