81#include "utils/fmgroids.h"
139 bool all_privs,
AclMode privileges,
211 errmsg(
"grant options can only be granted to roles")));
285 elog(
ERROR,
"grantable rights not supported for event triggers");
298 elog(
ERROR,
"unrecognized object type: %d", objtype);
336 errmsg(
"no privileges were granted for column \"%s\" of relation \"%s\"",
341 errmsg(
"no privileges were granted for \"%s\"",
349 errmsg(
"not all privileges were granted for column \"%s\" of relation \"%s\"",
354 errmsg(
"not all privileges were granted for \"%s\"",
365 errmsg(
"no privileges could be revoked for column \"%s\" of relation \"%s\"",
370 errmsg(
"no privileges could be revoked for \"%s\"",
378 errmsg(
"not all privileges could be revoked for column \"%s\" of relation \"%s\"",
383 errmsg(
"not all privileges could be revoked for \"%s\"",
399 const char *errormsg;
409 switch (
stmt->targtype)
420 elog(
ERROR,
"unrecognized GrantStmt.targtype: %d",
421 (
int)
stmt->targtype);
437 foreach(cell,
stmt->grantees)
458 switch (
stmt->objtype)
468 errormsg =
gettext_noop(
"invalid privilege type %s for relation");
472 errormsg =
gettext_noop(
"invalid privilege type %s for sequence");
476 errormsg =
gettext_noop(
"invalid privilege type %s for database");
480 errormsg =
gettext_noop(
"invalid privilege type %s for domain");
484 errormsg =
gettext_noop(
"invalid privilege type %s for function");
488 errormsg =
gettext_noop(
"invalid privilege type %s for language");
492 errormsg =
gettext_noop(
"invalid privilege type %s for large object");
496 errormsg =
gettext_noop(
"invalid privilege type %s for schema");
500 errormsg =
gettext_noop(
"invalid privilege type %s for procedure");
504 errormsg =
gettext_noop(
"invalid privilege type %s for routine");
508 errormsg =
gettext_noop(
"invalid privilege type %s for tablespace");
512 errormsg =
gettext_noop(
"invalid privilege type %s for type");
516 errormsg =
gettext_noop(
"invalid privilege type %s for foreign-data wrapper");
520 errormsg =
gettext_noop(
"invalid privilege type %s for foreign server");
524 errormsg =
gettext_noop(
"invalid privilege type %s for parameter");
528 errormsg =
gettext_noop(
"invalid privilege type %s for property graph");
531 elog(
ERROR,
"unrecognized GrantStmt.objtype: %d",
532 (
int)
stmt->objtype);
553 foreach(cell,
stmt->privileges)
567 errmsg(
"column privileges are only valid for relations")));
573 elog(
ERROR,
"AccessPriv node must specify privilege or columns");
637 elog(
ERROR,
"unrecognized GrantStmt.objtype: %d",
863 elog(
ERROR,
"unrecognized GrantStmt.objtype: %d",
925 const char *errormsg;
928 foreach(cell,
stmt->options)
956 iacls.is_grant = action->is_grant;
957 iacls.objtype = action->objtype;
961 iacls.grant_option = action->grant_option;
962 iacls.grantor = action->grantor;
963 iacls.behavior = action->behavior;
970 foreach(cell, action->grantees)
991 switch (action->objtype)
995 errormsg =
gettext_noop(
"invalid privilege type %s for relation");
999 errormsg =
gettext_noop(
"invalid privilege type %s for sequence");
1003 errormsg =
gettext_noop(
"invalid privilege type %s for function");
1007 errormsg =
gettext_noop(
"invalid privilege type %s for procedure");
1011 errormsg =
gettext_noop(
"invalid privilege type %s for routine");
1015 errormsg =
gettext_noop(
"invalid privilege type %s for type");
1019 errormsg =
gettext_noop(
"invalid privilege type %s for schema");
1023 errormsg =
gettext_noop(
"invalid privilege type %s for large object");
1027 errormsg =
gettext_noop(
"invalid privilege type %s for property graph");
1030 elog(
ERROR,
"unrecognized GrantStmt.objtype: %d",
1031 (
int) action->objtype);
1037 if (action->privileges ==
NIL)
1039 iacls.all_privs =
true;
1049 iacls.all_privs =
false;
1052 foreach(cell, action->privileges)
1060 errmsg(
"default privileges cannot be set for columns")));
1063 elog(
ERROR,
"AccessPriv node must specify privilege");
1071 iacls.privileges |= priv;
1096 errmsg(
"permission denied to change default privileges")));
1184 switch (
iacls->objtype)
1214 errmsg(
"cannot use IN SCHEMA clause when using %s",
1215 "GRANT/REVOKE ON SCHEMAS")));
1225 errmsg(
"cannot use IN SCHEMA clause when using %s",
1226 "GRANT/REVOKE ON LARGE OBJECTS")));
1233 elog(
ERROR,
"unrecognized object type: %d",
1234 (
int)
iacls->objtype);
1289 iacls->grant_option,
1451 elog(
ERROR,
"could not find tuple for default ACL %u", objid);
1480 elog(
ERROR,
"unexpected default ACL type: %d",
1488 iacls.is_grant =
false;
1489 iacls.all_privs =
true;
1492 iacls.grant_option =
false;
1540 elog(
ERROR,
"unexpected object class %u", classid);
1573 foreach(cell, colnames)
1582 errmsg(
"column \"%s\" of relation \"%s\" does not exist",
1586 elog(
ERROR,
"column number out of range");
1625 elog(
ERROR,
"cache lookup failed for attribute %d of relation %u",
1672 elog(
ERROR,
"cache lookup failed for attribute %d of relation %u",
1819 elog(
ERROR,
"cache lookup failed for relation %u", relOid);
1827 errmsg(
"\"%s\" is an index",
1834 errmsg(
"\"%s\" is a composite type",
1842 errmsg(
"\"%s\" is not a sequence",
1849 errmsg(
"\"%s\" is not a property graph",
1889 errmsg(
"sequence \"%s\" only supports USAGE, SELECT, and UPDATE privileges",
1906 errmsg(
"invalid privilege type %s for table",
2074 errmsg(
"invalid privilege type %s for column",
2087 errmsg(
"sequence \"%s\" only supports SELECT column privileges",
2278 errmsg(
"language \"%s\" is not trusted",
2280 errdetail(
"GRANT and REVOKE are not allowed on untrusted languages, "
2281 "because only superusers can use untrusted languages.")));
2333 elog(
ERROR,
"could not find tuple for large object %u",
loid);
2431 errmsg(
"cannot set privileges of array types"),
2432 errhint(
"Set the privileges of the element type instead.")));
2436 errmsg(
"cannot set privileges of multirange types"),
2437 errhint(
"Set the privileges of the range type instead.")));
2472 elog(
ERROR,
"cache lookup failed for parameter ACL %u",
2640 return "REFERENCES";
2656 return "ALTER SYSTEM";
2682 const char *msg =
"???";
2687 msg =
gettext_noop(
"permission denied for aggregate %s");
2690 msg =
gettext_noop(
"permission denied for collation %s");
2696 msg =
gettext_noop(
"permission denied for conversion %s");
2699 msg =
gettext_noop(
"permission denied for database %s");
2705 msg =
gettext_noop(
"permission denied for event trigger %s");
2708 msg =
gettext_noop(
"permission denied for extension %s");
2711 msg =
gettext_noop(
"permission denied for foreign-data wrapper %s");
2714 msg =
gettext_noop(
"permission denied for foreign server %s");
2717 msg =
gettext_noop(
"permission denied for foreign table %s");
2720 msg =
gettext_noop(
"permission denied for function %s");
2726 msg =
gettext_noop(
"permission denied for language %s");
2729 msg =
gettext_noop(
"permission denied for large object %s");
2732 msg =
gettext_noop(
"permission denied for materialized view %s");
2735 msg =
gettext_noop(
"permission denied for operator class %s");
2738 msg =
gettext_noop(
"permission denied for operator %s");
2741 msg =
gettext_noop(
"permission denied for operator family %s");
2744 msg =
gettext_noop(
"permission denied for parameter %s");
2750 msg =
gettext_noop(
"permission denied for procedure %s");
2753 msg =
gettext_noop(
"permission denied for property graph %s");
2756 msg =
gettext_noop(
"permission denied for publication %s");
2759 msg =
gettext_noop(
"permission denied for routine %s");
2765 msg =
gettext_noop(
"permission denied for sequence %s");
2768 msg =
gettext_noop(
"permission denied for statistics object %s");
2771 msg =
gettext_noop(
"permission denied for subscription %s");
2777 msg =
gettext_noop(
"permission denied for tablespace %s");
2780 msg =
gettext_noop(
"permission denied for text search configuration %s");
2783 msg =
gettext_noop(
"permission denied for text search dictionary %s");
2810 elog(
ERROR,
"unsupported object type: %d", objtype);
2820 const char *msg =
"???";
2840 msg =
gettext_noop(
"must be owner of event trigger %s");
2846 msg =
gettext_noop(
"must be owner of foreign-data wrapper %s");
2849 msg =
gettext_noop(
"must be owner of foreign server %s");
2852 msg =
gettext_noop(
"must be owner of foreign table %s");
2864 msg =
gettext_noop(
"must be owner of large object %s");
2867 msg =
gettext_noop(
"must be owner of materialized view %s");
2870 msg =
gettext_noop(
"must be owner of operator class %s");
2876 msg =
gettext_noop(
"must be owner of operator family %s");
2882 msg =
gettext_noop(
"must be owner of property graph %s");
2894 msg =
gettext_noop(
"must be owner of subscription %s");
2909 msg =
gettext_noop(
"must be owner of statistics object %s");
2915 msg =
gettext_noop(
"must be owner of text search configuration %s");
2918 msg =
gettext_noop(
"must be owner of text search dictionary %s");
2951 elog(
ERROR,
"unsupported object type: %d", objtype);
2978 errmsg(
"permission denied for column \"%s\" of relation \"%s\"",
3036 elog(
ERROR,
"grantable rights not supported for statistics objects");
3046 elog(
ERROR,
"grantable rights not supported for event triggers");
3052 elog(
ERROR,
"unrecognized object type: %d",
3130 elog(
ERROR,
"cache lookup failed for %s %u",
3152 result =
aclmask(acl, roleid, ownerId, mask,
how);
3213 errmsg(
"attribute %d of relation with OID %u does not exist",
3232 errmsg(
"attribute %d of relation with OID %u does not exist",
3270 errmsg(
"relation with OID %u does not exist",
3282 result =
aclmask(acl, roleid, ownerId, mask,
how);
3333 errmsg(
"relation with OID %u does not exist",
3389 result =
aclmask(acl, roleid, ownerId, mask,
how);
3518 errmsg(
"parameter ACL with OID %u does not exist",
3591 snapshot, 1, entry);
3616 result =
aclmask(acl, roleid, ownerId, mask,
how);
3728 result =
aclmask(acl, roleid, ownerId, mask,
how);
3783 errmsg(
"type with OID %u does not exist",
3810 errmsg(
"type with OID %u does not exist",
3839 errmsg(
"type with OID %u does not exist",
3864 result =
aclmask(acl, roleid, ownerId, mask,
how);
3990 errmsg(
"relation with OID %u does not exist",
4154 elog(
ERROR,
"cache lookup failed for %s %u",
4184 elog(
ERROR,
"could not find tuple for %s %u",
4214 bool result =
false;
4233 bool result =
false;
4415 elog(
ERROR,
"cache lookup failed for relation %u", objoid);
4516 elog(
ERROR,
"could not find tuple for large object %u", objoid);
4540 elog(
ERROR,
"cache lookup failed for %s %u",
4575 elog(
ERROR,
"cache lookup failed for relation %u", objoid);
4979 elog(
ERROR,
"cache lookup failed for %s %u",
Acl * aclconcat(const Acl *left_acl, const Acl *right_acl)
Acl * aclmerge(const Acl *left_acl, const Acl *right_acl, Oid ownerId)
Acl * acldefault(ObjectType objtype, Oid ownerId)
bool aclequal(const Acl *left_acl, const Acl *right_acl)
Acl * aclupdate(const Acl *old_acl, const AclItem *mod_aip, int modechg, Oid ownerId, DropBehavior behavior)
bool has_privs_of_role(Oid member, Oid role)
Acl * make_empty_acl(void)
int aclmembers(const Acl *acl, Oid **roleids)
Acl * aclnewowner(const Acl *old_acl, Oid oldOwnerId, Oid newOwnerId)
Acl * aclcopy(const Acl *orig_acl)
void aclitemsort(Acl *acl)
AclMode aclmask(const Acl *acl, Oid roleid, Oid ownerId, AclMode mask, AclMaskHow how)
void select_best_grantor(const RoleSpec *grantedBy, AclMode privileges, const Acl *acl, Oid ownerId, Oid *grantorId, AclMode *grantOptions)
Oid get_rolespec_oid(const RoleSpec *role, bool missing_ok)
#define ACLITEM_ALL_PRIV_BITS
#define ACL_ALL_RIGHTS_FOREIGN_SERVER
#define ACL_ALL_RIGHTS_TABLESPACE
#define ACL_ALL_RIGHTS_PARAMETER_ACL
#define ACL_ALL_RIGHTS_SCHEMA
#define ACL_ALL_RIGHTS_SEQUENCE
#define ACL_ALL_RIGHTS_DATABASE
#define ACL_ALL_RIGHTS_PROPGRAPH
#define ACL_ALL_RIGHTS_COLUMN
#define ACL_OPTION_TO_PRIVS(privs)
#define ACL_ALL_RIGHTS_FUNCTION
#define ACL_ALL_RIGHTS_LANGUAGE
#define ACL_ALL_RIGHTS_TYPE
#define ACL_ALL_RIGHTS_FDW
#define ACLITEM_SET_PRIVS_GOPTIONS(item, privs, goptions)
#define DatumGetAclPCopy(X)
#define ACL_ALL_RIGHTS_RELATION
#define ACL_ALL_RIGHTS_LARGEOBJECT
#define ACL_GRANT_OPTION_FOR(privs)
static AclMode pg_attribute_aclmask_ext(Oid table_oid, AttrNumber attnum, Oid roleid, AclMode mask, AclMaskHow how, bool *is_missing)
AclResult object_aclcheck_ext(Oid classid, Oid objectid, Oid roleid, AclMode mode, bool *is_missing)
void ExecuteGrantStmt(GrantStmt *stmt)
AclResult pg_largeobject_aclcheck_snapshot(Oid lobj_oid, Oid roleid, AclMode mode, Snapshot snapshot)
static void expand_all_col_privileges(Oid table_oid, Form_pg_class classForm, AclMode this_privileges, AclMode *col_privileges, int num_col_privileges)
void RemoveRoleFromInitPriv(Oid roleid, Oid classid, Oid objid, int32 objsubid)
static void recordExtensionInitPriv(Oid objoid, Oid classoid, int objsubid, Acl *new_acl)
static void expand_col_privileges(List *colnames, Oid table_oid, AclMode this_privileges, AclMode *col_privileges, int num_col_privileges)
bool has_bypassrls_privilege(Oid roleid)
AclResult pg_class_aclcheck_ext(Oid table_oid, Oid roleid, AclMode mode, bool *is_missing)
void aclcheck_error_col(AclResult aclerr, ObjectType objtype, const char *objectname, const char *colname)
AclResult pg_attribute_aclcheck_all_ext(Oid table_oid, Oid roleid, AclMode mode, AclMaskHow how, bool *is_missing)
void recordDependencyOnNewAcl(Oid classId, Oid objectId, int32 objsubId, Oid ownerId, Acl *acl)
static void ExecGrant_Attribute(InternalGrant *istmt, Oid relOid, const char *relname, AttrNumber attnum, Oid ownerId, AclMode col_privileges, Relation attRelation, const Acl *old_rel_acl)
static void ExecGrant_Type_check(InternalGrant *istmt, HeapTuple tuple)
void ExecAlterDefaultPrivilegesStmt(ParseState *pstate, AlterDefaultPrivilegesStmt *stmt)
static void ExecGrantStmt_oids(InternalGrant *istmt)
static AclMode pg_largeobject_aclmask_snapshot(Oid lobj_oid, Oid roleid, AclMode mask, AclMaskHow how, Snapshot snapshot)
static AclMode pg_attribute_aclmask(Oid table_oid, AttrNumber attnum, Oid roleid, AclMode mask, AclMaskHow how)
static List * objectNamesToOids(ObjectType objtype, List *objnames, bool is_grant)
static AclMode pg_parameter_aclmask(const char *name, Oid roleid, AclMode mask, AclMaskHow how)
AclResult pg_attribute_aclcheck_all(Oid table_oid, Oid roleid, AclMode mode, AclMaskHow how)
static AclMode pg_parameter_acl_aclmask(Oid acl_oid, Oid roleid, AclMode mask, AclMaskHow how)
static void SetDefaultACL(InternalDefaultACL *iacls)
static List * objectsInSchemaToOids(ObjectType objtype, List *nspnames)
AclResult pg_parameter_aclcheck(const char *name, Oid roleid, AclMode mode)
void ReplaceRoleInInitPriv(Oid oldroleid, Oid newroleid, Oid classid, Oid objid, int32 objsubid)
static void ExecGrant_common(InternalGrant *istmt, Oid classid, AclMode default_privs, void(*object_check)(InternalGrant *istmt, HeapTuple tuple))
static Acl * merge_acl_with_grant(Acl *old_acl, bool is_grant, bool grant_option, DropBehavior behavior, List *grantees, AclMode privileges, Oid grantorId, Oid ownerId)
void recordExtObjInitPriv(Oid objoid, Oid classoid)
static List * getRelationsInNamespace(Oid namespaceId, char relkind)
static AclMode pg_class_aclmask_ext(Oid table_oid, Oid roleid, AclMode mask, AclMaskHow how, bool *is_missing)
static AclMode string_to_privilege(const char *privname)
void aclcheck_error(AclResult aclerr, ObjectType objtype, const char *objectname)
static AclMode object_aclmask(Oid classid, Oid objectid, Oid roleid, AclMode mask, AclMaskHow how)
static void ExecGrant_Largeobject(InternalGrant *istmt)
AclResult pg_attribute_aclcheck(Oid table_oid, AttrNumber attnum, Oid roleid, AclMode mode)
static AclMode restrict_and_check_grant(bool is_grant, AclMode avail_goptions, bool all_privs, AclMode privileges, Oid objectId, Oid grantorId, ObjectType objtype, const char *objname, AttrNumber att_number, const char *colname)
AclResult object_aclcheck(Oid classid, Oid objectid, Oid roleid, AclMode mode)
static void recordExtensionInitPrivWorker(Oid objoid, Oid classoid, int objsubid, Acl *new_acl)
bool object_ownercheck(Oid classid, Oid objectid, Oid roleid)
AclResult pg_attribute_aclcheck_ext(Oid table_oid, AttrNumber attnum, Oid roleid, AclMode mode, bool *is_missing)
static AclMode pg_namespace_aclmask_ext(Oid nsp_oid, Oid roleid, AclMode mask, AclMaskHow how, bool *is_missing)
static void SetDefaultACLsInSchemas(InternalDefaultACL *iacls, List *nspnames)
AclMode pg_class_aclmask(Oid table_oid, Oid roleid, AclMode mask, AclMaskHow how)
static void ExecGrant_Parameter(InternalGrant *istmt)
static const char * privilege_to_string(AclMode privilege)
static Acl * get_default_acl_internal(Oid roleId, Oid nsp_oid, char objtype)
void aclcheck_error_type(AclResult aclerr, Oid typeOid)
bool has_createrole_privilege(Oid roleid)
static void ExecGrant_Relation(InternalGrant *istmt)
static AclMode pg_type_aclmask_ext(Oid type_oid, Oid roleid, AclMode mask, AclMaskHow how, bool *is_missing)
bool binary_upgrade_record_init_privs
Acl * get_user_default_acl(ObjectType objtype, Oid ownerId, Oid nsp_oid)
void RemoveRoleFromObjectACL(Oid roleid, Oid classid, Oid objid)
static void ExecGrant_Language_check(InternalGrant *istmt, HeapTuple tuple)
AclResult pg_class_aclcheck(Oid table_oid, Oid roleid, AclMode mode)
static AclMode pg_aclmask(ObjectType objtype, Oid object_oid, AttrNumber attnum, Oid roleid, AclMode mask, AclMaskHow how)
static AclMode object_aclmask_ext(Oid classid, Oid objectid, Oid roleid, AclMode mask, AclMaskHow how, bool *is_missing)
void removeExtObjInitPriv(Oid objoid, Oid classoid)
#define InvalidAttrNumber
static Datum values[MAXATTR]
#define TextDatumGetCString(d)
#define Assert(condition)
#define OidIsValid(objectId)
Oid GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
bool IsSystemClass(Oid relid, Form_pg_class reltuple)
void errorConflictingDefElem(DefElem *defel, ParseState *pstate)
void performDeletion(const ObjectAddress *object, DropBehavior behavior, int flags)
int errcode(int sqlerrcode)
int errhint(const char *fmt,...) pg_attribute_printf(1
int errdetail(const char *fmt,...) pg_attribute_printf(1
#define ereport(elevel,...)
bool EventTriggerSupportsObjectType(ObjectType obtype)
void EventTriggerCollectGrant(InternalGrant *istmt)
#define palloc0_array(type, count)
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)
char * convert_GUC_name_for_parameter_acl(const char *name)
HeapTuple heap_getnext(TableScanDesc sscan, ScanDirection direction)
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)
#define HeapTupleIsValid(tuple)
static Datum heap_getattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
static void * GETSTRUCT(const HeapTupleData *tuple)
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)
List * list_concat(List *list1, const List *list2)
List * lappend_oid(List *list, Oid datum)
void UnlockTuple(Relation relation, const ItemPointerData *tid, LOCKMODE lockmode)
#define InplaceUpdateTupleLock
char * get_rel_name(Oid relid)
AttrNumber get_attnum(Oid relid, const char *attname)
Oid get_element_type(Oid typid)
Oid get_multirange_range(Oid multirangeOid)
TypeName * makeTypeNameFromNameList(List *names)
void pfree(void *pointer)
void * palloc0(Size size)
#define IsBootstrapProcessingMode()
Oid LookupExplicitNamespace(const char *nspname, bool missing_ok)
bool isTempNamespace(Oid namespaceId)
Oid get_namespace_oid(const char *nspname, bool missing_ok)
#define RangeVarGetRelid(relation, lockmode, missing_ok)
#define InvokeObjectPostCreateHook(classId, objectId, subId)
#define InvokeObjectPostAlterHook(classId, objectId, subId)
AttrNumber get_object_attnum_owner(Oid class_id)
AttrNumber get_object_attnum_oid(Oid class_id)
AttrNumber get_object_attnum_name(Oid class_id)
const char * get_object_class_descr(Oid class_id)
AttrNumber get_object_attnum_acl(Oid class_id)
Oid get_object_oid_index(Oid class_id)
SysCacheIdentifier get_object_catcache_oid(Oid class_id)
ObjectType get_object_type(Oid class_id, Oid object_id)
ObjectAddress get_object_address(ObjectType objtype, Node *object, Relation *relp, LOCKMODE lockmode, bool missing_ok)
@ OBJECT_PUBLICATION_NAMESPACE
@ ACL_TARGET_ALL_IN_SCHEMA
FormData_pg_attribute * Form_pg_attribute
END_CATALOG_STRUCT typedef FormData_pg_authid * Form_pg_authid
static PgChecksumMode mode
FormData_pg_class * Form_pg_class
END_CATALOG_STRUCT typedef FormData_pg_default_acl * Form_pg_default_acl
void recordDependencyOn(const ObjectAddress *depender, const ObjectAddress *referenced, DependencyType behavior)
END_CATALOG_STRUCT typedef FormData_pg_language * Form_pg_language
#define list_make1_oid(x1)
END_CATALOG_STRUCT typedef FormData_pg_namespace * Form_pg_namespace
Oid ParameterAclLookup(const char *parameter, bool missing_ok)
Oid ParameterAclCreate(const char *parameter)
END_CATALOG_STRUCT typedef FormData_pg_proc * Form_pg_proc
void updateAclDependencies(Oid classId, Oid objectId, int32 objsubId, Oid ownerId, int noldmembers, Oid *oldmembers, int nnewmembers, Oid *newmembers)
void updateInitAclDependencies(Oid classId, Oid objectId, int32 objsubId, int noldmembers, Oid *oldmembers, int nnewmembers, Oid *newmembers)
void recordDependencyOnOwner(Oid classId, Oid objectId, Oid owner)
END_CATALOG_STRUCT typedef FormData_pg_type * Form_pg_type
#define ERRCODE_UNDEFINED_TABLE
static Datum PointerGetDatum(const void *X)
static Name DatumGetName(Datum X)
static Oid DatumGetObjectId(Datum X)
static Datum Int16GetDatum(int16 X)
static Datum ObjectIdGetDatum(Oid X)
static Pointer DatumGetPointer(Datum X)
static Datum Int32GetDatum(int32 X)
static Datum CharGetDatum(char X)
#define RelationGetDescr(relation)
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
#define BTEqualStrategyNumber
bool superuser_arg(Oid roleid)
#define FirstLowInvalidHeapAttributeNumber
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache2(SysCacheIdentifier cacheId, Datum key1, Datum key2)
HeapTuple SearchSysCacheLocked1(SysCacheIdentifier cacheId, Datum key1)
HeapTuple SearchSysCache3(SysCacheIdentifier cacheId, Datum key1, Datum key2, Datum key3)
Datum SysCacheGetAttrNotNull(SysCacheIdentifier cacheId, HeapTuple tup, AttrNumber attributeNumber)
HeapTuple SearchSysCache1(SysCacheIdentifier cacheId, Datum key1)
Datum SysCacheGetAttr(SysCacheIdentifier cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
TableScanDesc table_beginscan_catalog(Relation relation, int nkeys, ScanKeyData *key)
static void table_endscan(TableScanDesc scan)
text * cstring_to_text(const char *s)
void CommandCounterIncrement(void)