24#include "utils/fmgroids.h"
131 errmsg(
"no security label providers have been loaded")));
135 errmsg(
"must specify provider when multiple security label providers have been loaded")));
153 errmsg(
"security label provider \"%s\" is not loaded",
160 errmsg(
"security labels are not supported for this type of object")));
173 stmt->object, relation);
176 switch (
stmt->objtype)
193 errmsg(
"cannot set security label on relation \"%s\"",
213 if (relation !=
NULL)
342 memset(nulls,
false,
sizeof(nulls));
424 memset(nulls,
false,
sizeof(nulls));
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
#define TextDatumGetCString(d)
#define Assert(condition)
bool IsSharedRelation(Oid relationId)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define palloc_object(type)
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)
HeapTuple heap_modify_tuple(HeapTuple tuple, TupleDesc tupleDesc, const Datum *replValues, const bool *replIsnull, const bool *doReplace)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
void heap_freetuple(HeapTuple htup)
#define HeapTupleIsValid(tuple)
static Datum heap_getattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
void CatalogTupleUpdate(Relation heapRel, const ItemPointerData *otid, HeapTuple tup)
void CatalogTupleInsert(Relation heapRel, HeapTuple tup)
void CatalogTupleDelete(Relation heapRel, const ItemPointerData *tid)
List * lappend(List *list, void *datum)
#define ShareUpdateExclusiveLock
char * pstrdup(const char *in)
MemoryContext TopMemoryContext
void check_object_ownership(Oid roleid, ObjectType objtype, ObjectAddress address, Node *object, Relation relation)
ObjectAddress get_object_address(ObjectType objtype, Node *object, Relation *relp, LOCKMODE lockmode, bool missing_ok)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
@ OBJECT_PUBLICATION_NAMESPACE
int errdetail_relkind_not_supported(char relkind)
static int list_length(const List *l)
static Datum ObjectIdGetDatum(Oid X)
static Datum Int32GetDatum(int32 X)
#define RelationGetDescr(relation)
#define RelationGetRelationName(relation)
bool criticalSharedRelcachesBuilt
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
static char * GetSharedSecurityLabel(const ObjectAddress *object, const char *provider)
void SetSecurityLabel(const ObjectAddress *object, const char *provider, const char *label)
ObjectAddress ExecSecLabelStmt(SecLabelStmt *stmt)
void register_label_provider(const char *provider_name, check_object_relabel_type hook)
static List * label_provider_list
static bool SecLabelSupportsObjectType(ObjectType objtype)
char * GetSecurityLabel(const ObjectAddress *object, const char *provider)
static void SetSharedSecurityLabel(const ObjectAddress *object, const char *provider, const char *label)
void DeleteSecurityLabel(const ObjectAddress *object)
void DeleteSharedSecurityLabel(Oid objectId, Oid classId)
void(* check_object_relabel_type)(const ObjectAddress *object, const char *seclabel)
void relation_close(Relation relation, LOCKMODE lockmode)
#define BTEqualStrategyNumber
const char * provider_name
check_object_relabel_type hook
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)