PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <ctype.h>
#include "access/htup_details.h"
#include "catalog/catalog.h"
#include "catalog/namespace.h"
#include "catalog/pg_auth_members.h"
#include "catalog/pg_authid.h"
#include "catalog/pg_class.h"
#include "catalog/pg_database.h"
#include "catalog/pg_parameter_acl.h"
#include "catalog/pg_type.h"
#include "commands/dbcommands.h"
#include "commands/proclang.h"
#include "commands/tablespace.h"
#include "common/hashfn.h"
#include "foreign/foreign.h"
#include "funcapi.h"
#include "lib/qunique.h"
#include "miscadmin.h"
#include "utils/acl.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/catcache.h"
#include "utils/guc.h"
#include "utils/inval.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/syscache.h"
#include "utils/varlena.h"
Go to the source code of this file.
Data Structures | |
struct | priv_map |
Enumerations | |
enum | RoleRecurseType { ROLERECURSE_PRIVS = 0 , ROLERECURSE_MEMBERS = 1 } |
Variables | |
static Oid | cached_role [] = {InvalidOid, InvalidOid} |
static List * | cached_roles [] = {NIL, NIL} |
static uint32 | cached_db_hash |
enum RoleRecurseType |
Definition at line 422 of file acl.c.
References ACL_DAT, ACL_NUM, and allocacl().
Referenced by ExecGrant_Attribute().
Datum aclcontains | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1546 of file acl.c.
References ACL_DAT, ACL_NUM, ACLITEM_GET_RIGHTS, AclItem::ai_grantee, AclItem::ai_grantor, check_acl(), i, PG_GETARG_ACL_P, PG_GETARG_ACLITEM_P, and PG_RETURN_BOOL.
Definition at line 402 of file acl.c.
References ACL_DAT, ACL_NUM, and allocacl().
Referenced by aclmerge(), ExecGrant_Relation(), and SetDefaultACL().
Acl* acldefault | ( | ObjectType | objtype, |
Oid | ownerId | ||
) |
Definition at line 743 of file acl.c.
References ACL_ALL_RIGHTS_DATABASE, ACL_ALL_RIGHTS_FDW, ACL_ALL_RIGHTS_FOREIGN_SERVER, ACL_ALL_RIGHTS_FUNCTION, ACL_ALL_RIGHTS_LANGUAGE, ACL_ALL_RIGHTS_LARGEOBJECT, ACL_ALL_RIGHTS_PARAMETER_ACL, ACL_ALL_RIGHTS_RELATION, ACL_ALL_RIGHTS_SCHEMA, ACL_ALL_RIGHTS_SEQUENCE, ACL_ALL_RIGHTS_TABLESPACE, ACL_ALL_RIGHTS_TYPE, ACL_CONNECT, ACL_CREATE_TEMP, ACL_DAT, ACL_EXECUTE, ACL_ID_PUBLIC, ACL_NO_RIGHTS, ACL_USAGE, ACLITEM_SET_PRIVS_GOPTIONS, AclItem::ai_grantee, AclItem::ai_grantor, allocacl(), elog, ERROR, OBJECT_COLUMN, OBJECT_DATABASE, OBJECT_DOMAIN, OBJECT_FDW, OBJECT_FOREIGN_SERVER, OBJECT_FUNCTION, OBJECT_LANGUAGE, OBJECT_LARGEOBJECT, OBJECT_PARAMETER_ACL, OBJECT_SCHEMA, OBJECT_SEQUENCE, OBJECT_TABLE, OBJECT_TABLESPACE, and OBJECT_TYPE.
Referenced by acldefault_sql(), buildDefaultACLCommands(), dumpACL(), dumpRoleGUCPrivs(), dumpTable(), dumpTablespaces(), ExecGrant_Attribute(), ExecGrant_Database(), ExecGrant_Fdw(), ExecGrant_ForeignServer(), ExecGrant_Function(), ExecGrant_Language(), ExecGrant_Largeobject(), ExecGrant_Namespace(), ExecGrant_Parameter(), ExecGrant_Relation(), ExecGrant_Tablespace(), ExecGrant_Type(), get_user_default_acl(), pg_class_aclmask_ext(), pg_database_aclmask(), pg_foreign_data_wrapper_aclmask(), pg_foreign_server_aclmask(), pg_language_aclmask(), pg_largeobject_aclmask_snapshot(), pg_namespace_aclmask(), pg_parameter_acl_aclmask(), pg_parameter_aclmask(), pg_proc_aclmask(), pg_tablespace_aclmask(), pg_type_aclmask(), and SetDefaultACL().
Datum acldefault_sql | ( | PG_FUNCTION_ARGS | ) |
Definition at line 860 of file acl.c.
References acldefault(), elog, ERROR, OBJECT_COLUMN, OBJECT_DATABASE, OBJECT_FDW, OBJECT_FOREIGN_SERVER, OBJECT_FUNCTION, OBJECT_LANGUAGE, OBJECT_LARGEOBJECT, OBJECT_PARAMETER_ACL, OBJECT_SCHEMA, OBJECT_SEQUENCE, OBJECT_TABLE, OBJECT_TABLESPACE, OBJECT_TYPE, PG_GETARG_CHAR, PG_GETARG_OID, and PG_RETURN_ACL_P.
Definition at line 504 of file acl.c.
References ACL_DAT, and ACL_NUM.
Referenced by ExecGrant_Parameter(), get_user_default_acl(), and SetDefaultACL().
Datum aclexplode | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1747 of file acl.c.
References ACL_DAT, ACL_NUM, ACLITEM_GET_GOPTIONS, ACLITEM_GET_PRIVS, AclItem::ai_grantee, AclItem::ai_grantor, BlessTupleDesc(), BoolGetDatum, check_acl(), convert_aclright_to_string(), CreateTemplateTupleDesc(), CStringGetTextDatum, heap_form_tuple(), HeapTupleGetDatum, idx(), MemoryContextSwitchTo(), MemSet, FuncCallContext::multi_call_memory_ctx, N_ACL_RIGHTS, ObjectIdGetDatum, palloc(), PG_GETARG_ACL_P, SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, FuncCallContext::tuple_desc, TupleDescInitEntry(), FuncCallContext::user_fctx, and values.
Datum aclinsert | ( | PG_FUNCTION_ARGS | ) |
Datum aclitem_eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 653 of file acl.c.
Referenced by aclnewowner(), and aclupdate().
|
static |
Datum aclitemin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 560 of file acl.c.
References aclparse(), ereport, errcode(), errmsg(), ERROR, palloc(), PG_GETARG_CSTRING, and PG_RETURN_ACLITEM_P.
Datum aclitemout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 586 of file acl.c.
References ACL_ALL_RIGHTS_STR, ACL_ID_PUBLIC, ACLITEM_GET_GOPTIONS, ACLITEM_GET_PRIVS, AclItem::ai_grantee, AclItem::ai_grantor, AUTHOID, GETSTRUCT, HeapTupleIsValid, i, N_ACL_RIGHTS, NAMEDATALEN, NameStr, ObjectIdGetDatum, palloc(), PG_GETARG_ACLITEM_P, PG_RETURN_CSTRING, putid(), ReleaseSysCache(), rolname, SearchSysCache1(), and sprintf.
void aclitemsort | ( | Acl * | acl | ) |
Definition at line 490 of file acl.c.
References ACL_DAT, ACL_NUM, aclitemComparator(), and qsort.
Referenced by get_user_default_acl(), and SetDefaultACL().
Definition at line 1322 of file acl.c.
References ACL_DAT, ACL_ID_PUBLIC, ACL_NUM, ACLITEM_ALL_GOPTION_BITS, ACLMASK_ALL, AclItem::ai_grantee, AclItem::ai_privs, check_acl(), elog, ERROR, has_privs_of_role(), i, and remaining.
Referenced by check_circularity(), LockTableAclCheck(), pg_attribute_aclmask_ext(), pg_class_aclmask_ext(), pg_database_aclmask(), pg_foreign_data_wrapper_aclmask(), pg_foreign_server_aclmask(), pg_language_aclmask(), pg_largeobject_aclmask_snapshot(), pg_namespace_aclmask(), pg_parameter_acl_aclmask(), pg_parameter_aclmask(), pg_proc_aclmask(), pg_tablespace_aclmask(), pg_type_aclmask(), and recursive_revoke().
|
static |
Definition at line 1411 of file acl.c.
References ACL_DAT, ACL_NUM, ACLITEM_ALL_GOPTION_BITS, ACLMASK_ALL, AclItem::ai_grantee, AclItem::ai_privs, check_acl(), elog, ERROR, and i.
Referenced by select_best_grantor().
Definition at line 1474 of file acl.c.
References ACL_DAT, ACL_ID_PUBLIC, ACL_NUM, AclItem::ai_grantee, AclItem::ai_grantor, check_acl(), i, j, sort-test::list, oid_cmp(), palloc(), qsort, and qunique().
Referenced by ExecGrant_Attribute(), ExecGrant_Database(), ExecGrant_Fdw(), ExecGrant_ForeignServer(), ExecGrant_Function(), ExecGrant_Language(), ExecGrant_Largeobject(), ExecGrant_Namespace(), ExecGrant_Parameter(), ExecGrant_Relation(), ExecGrant_Tablespace(), ExecGrant_Type(), recordDependencyOnNewAcl(), and SetDefaultACL().
Definition at line 446 of file acl.c.
References ACL_DAT, ACL_MODECHG_ADD, ACL_NUM, aclcopy(), aclupdate(), DROP_RESTRICT, i, and pfree().
Referenced by get_user_default_acl().
Definition at line 1053 of file acl.c.
References ACL_DAT, ACL_N_SIZE, ACL_NO_RIGHTS, ACL_NUM, ACLITEM_GET_RIGHTS, aclitem_match(), ACLITEM_SET_RIGHTS, AclItem::ai_grantee, AclItem::ai_grantor, allocacl(), ARR_DIMS, check_acl(), and SET_VARSIZE.
Referenced by AlterDatabaseOwner(), AlterForeignDataWrapperOwner_internal(), AlterForeignServerOwner_internal(), AlterObjectOwner_internal(), AlterSchemaOwner_internal(), AlterTypeOwnerInternal(), ATExecChangeOwner(), and change_owner_fix_column_acls().
|
static |
Definition at line 235 of file acl.c.
References ACL_ALL_RIGHTS_STR, ACL_ALTER_SYSTEM, ACL_ALTER_SYSTEM_CHR, ACL_CONNECT, ACL_CONNECT_CHR, ACL_CREATE, ACL_CREATE_CHR, ACL_CREATE_TEMP, ACL_CREATE_TEMP_CHR, ACL_DELETE, ACL_DELETE_CHR, ACL_EXECUTE, ACL_EXECUTE_CHR, ACL_ID_PUBLIC, ACL_INSERT, ACL_INSERT_CHR, ACL_NO_RIGHTS, ACL_REFERENCES, ACL_REFERENCES_CHR, ACL_SELECT, ACL_SELECT_CHR, ACL_SET, ACL_SET_CHR, ACL_TRIGGER, ACL_TRIGGER_CHR, ACL_TRUNCATE, ACL_TRUNCATE_CHR, ACL_UPDATE, ACL_UPDATE_CHR, ACL_USAGE, ACL_USAGE_CHR, ACLITEM_SET_PRIVS_GOPTIONS, AclItem::ai_grantee, AclItem::ai_grantor, Assert(), ereport, errcode(), errhint(), errmsg(), ERROR, get_role_oid(), getid(), name, NAMEDATALEN, read, and WARNING.
Referenced by aclitemin().
Datum aclremove | ( | PG_FUNCTION_ARGS | ) |
Acl* aclupdate | ( | const Acl * | old_acl, |
const AclItem * | mod_aip, | ||
int | modechg, | ||
Oid | ownerId, | ||
DropBehavior | behavior | ||
) |
Definition at line 932 of file acl.c.
References ACL_DAT, ACL_ID_PUBLIC, ACL_MODECHG_ADD, ACL_MODECHG_DEL, ACL_MODECHG_EQL, ACL_N_SIZE, ACL_NO_RIGHTS, ACL_NUM, ACL_SIZE, ACLITEM_GET_GOPTIONS, ACLITEM_GET_RIGHTS, aclitem_match(), ACLITEM_SET_PRIVS_GOPTIONS, ACLITEM_SET_RIGHTS, AclItem::ai_grantee, AclItem::ai_grantor, allocacl(), ARR_DIMS, Assert(), check_acl(), check_circularity(), recursive_revoke(), and SET_VARSIZE.
Referenced by aclmerge(), check_circularity(), merge_acl_with_grant(), and recursive_revoke().
|
static |
Definition at line 371 of file acl.c.
References ACL_N_SIZE, ARR_DIMS, ARR_LBOUND, ArrayType::dataoffset, ArrayType::elemtype, elog, ERROR, ArrayType::ndim, palloc0(), and SET_VARSIZE.
Referenced by aclconcat(), aclcopy(), acldefault(), aclnewowner(), aclupdate(), check_circularity(), and make_empty_acl().
|
static |
Definition at line 535 of file acl.c.
References ARR_ELEMTYPE, ARR_HASNULL, ARR_NDIM, ereport, errcode(), errmsg(), and ERROR.
Referenced by aclcontains(), aclexplode(), aclmask(), aclmask_direct(), aclmembers(), aclnewowner(), aclupdate(), check_circularity(), and recursive_revoke().
Definition at line 1156 of file acl.c.
References ACL_DAT, ACL_GRANT_OPTION_FOR, ACL_ID_PUBLIC, ACL_MODECHG_DEL, ACL_NO_RIGHTS, ACL_NUM, ACL_OPTION_TO_PRIVS, ACL_SIZE, ACLITEM_GET_GOPTIONS, aclmask(), ACLMASK_ALL, aclupdate(), AclItem::ai_grantee, AclItem::ai_grantor, allocacl(), Assert(), check_acl(), DROP_CASCADE, ereport, errcode(), errmsg(), ERROR, i, and pfree().
Referenced by aclupdate().
Definition at line 5003 of file acl.c.
References ereport, errcode(), errmsg(), ERROR, GetUserNameFromId(), and is_member_of_role().
Referenced by AlterDatabaseOwner(), AlterForeignServerOwner_internal(), AlterObjectOwner_internal(), AlterPublicationOwner_internal(), AlterSchemaOwner_internal(), AlterTypeOwner(), ATExecChangeOwner(), createdb(), CreateSchemaCommand(), and ExecAlterDefaultPrivilegesStmt().
void check_rolespec_name | ( | const RoleSpec * | role, |
const char * | detail_msg | ||
) |
Definition at line 5318 of file acl.c.
References ereport, errcode(), errdetail(), errmsg(), ERROR, IsReservedName(), RoleSpec::rolename, ROLESPEC_CSTRING, and RoleSpec::roletype.
Referenced by AlterRole(), and AlterRoleSet().
|
static |
Definition at line 2467 of file acl.c.
References ACLCHECK_OK, attnum, InvalidAttrNumber, mode, pg_attribute_aclcheck_ext(), and pg_class_aclcheck_ext().
Referenced by has_column_privilege_id_attnum(), has_column_privilege_id_id_attnum(), has_column_privilege_id_id_name(), has_column_privilege_id_name(), has_column_privilege_id_name_attnum(), has_column_privilege_id_name_name(), has_column_privilege_name_attnum(), has_column_privilege_name_id_attnum(), has_column_privilege_name_id_name(), has_column_privilege_name_name(), has_column_privilege_name_name_attnum(), and has_column_privilege_name_name_name().
|
static |
Definition at line 1693 of file acl.c.
References ACL_ALTER_SYSTEM, ACL_CONNECT, ACL_CREATE, ACL_CREATE_TEMP, ACL_DELETE, ACL_EXECUTE, ACL_INSERT, ACL_REFERENCES, ACL_SELECT, ACL_SET, ACL_TRIGGER, ACL_TRUNCATE, ACL_UPDATE, ACL_USAGE, elog, and ERROR.
Referenced by aclexplode().
|
static |
Definition at line 1645 of file acl.c.
References ereport, errcode(), errmsg(), ERROR, priv_map::name, pfree(), pg_strcasecmp(), text_to_cstring(), and priv_map::value.
Referenced by convert_column_priv_string(), convert_database_priv_string(), convert_foreign_data_wrapper_priv_string(), convert_function_priv_string(), convert_language_priv_string(), convert_parameter_priv_string(), convert_role_priv_string(), convert_schema_priv_string(), convert_sequence_priv_string(), convert_server_priv_string(), convert_table_priv_string(), convert_tablespace_priv_string(), and convert_type_priv_string().
|
static |
Definition at line 2827 of file acl.c.
References ATTNAME, attnum, CStringGetDatum, ereport, errcode(), errmsg(), ERROR, get_rel_name(), GETSTRUCT, HeapTupleIsValid, InvalidAttrNumber, ObjectIdGetDatum, pfree(), ReleaseSysCache(), SearchSysCache2(), and text_to_cstring().
Referenced by has_column_privilege_id_id_name(), has_column_privilege_id_name(), has_column_privilege_id_name_name(), has_column_privilege_name_id_name(), has_column_privilege_name_name(), and has_column_privilege_name_name_name().
Definition at line 2885 of file acl.c.
References ACL_GRANT_OPTION_FOR, ACL_INSERT, ACL_REFERENCES, ACL_SELECT, ACL_UPDATE, and convert_any_priv_string().
Referenced by has_any_column_privilege_id(), has_any_column_privilege_id_id(), has_any_column_privilege_id_name(), has_any_column_privilege_name(), has_any_column_privilege_name_id(), has_any_column_privilege_name_name(), has_column_privilege_id_attnum(), has_column_privilege_id_id_attnum(), has_column_privilege_id_id_name(), has_column_privilege_id_name(), has_column_privilege_id_name_attnum(), has_column_privilege_id_name_name(), has_column_privilege_name_attnum(), has_column_privilege_name_id_attnum(), has_column_privilege_name_id_name(), has_column_privilege_name_name(), has_column_privilege_name_name_attnum(), and has_column_privilege_name_name_name().
Definition at line 3070 of file acl.c.
References dbname, get_database_oid(), and text_to_cstring().
Referenced by has_database_privilege_id_name(), has_database_privilege_name(), and has_database_privilege_name_name().
Definition at line 3082 of file acl.c.
References ACL_CONNECT, ACL_CREATE, ACL_CREATE_TEMP, ACL_GRANT_OPTION_FOR, and convert_any_priv_string().
Referenced by has_database_privilege_id(), has_database_privilege_id_id(), has_database_privilege_id_name(), has_database_privilege_name(), has_database_privilege_name_id(), and has_database_privilege_name_name().
Definition at line 3267 of file acl.c.
References get_foreign_data_wrapper_oid(), and text_to_cstring().
Referenced by has_foreign_data_wrapper_privilege_id_name(), has_foreign_data_wrapper_privilege_name(), and has_foreign_data_wrapper_privilege_name_name().
Definition at line 3279 of file acl.c.
References ACL_GRANT_OPTION_FOR, ACL_USAGE, and convert_any_priv_string().
Referenced by has_foreign_data_wrapper_privilege_id(), has_foreign_data_wrapper_privilege_id_id(), has_foreign_data_wrapper_privilege_id_name(), has_foreign_data_wrapper_privilege_name(), has_foreign_data_wrapper_privilege_name_id(), and has_foreign_data_wrapper_privilege_name_name().
Definition at line 3458 of file acl.c.
References CStringGetDatum, DatumGetObjectId, DirectFunctionCall1, ereport, errcode(), errmsg(), ERROR, OidIsValid, regprocedurein(), and text_to_cstring().
Referenced by has_function_privilege_id_name(), has_function_privilege_name(), and has_function_privilege_name_name().
Definition at line 3479 of file acl.c.
References ACL_EXECUTE, ACL_GRANT_OPTION_FOR, and convert_any_priv_string().
Referenced by has_function_privilege_id(), has_function_privilege_id_id(), has_function_privilege_id_name(), has_function_privilege_name(), has_function_privilege_name_id(), and has_function_privilege_name_name().
Definition at line 3658 of file acl.c.
References get_language_oid(), and text_to_cstring().
Referenced by has_language_privilege_id_name(), has_language_privilege_name(), and has_language_privilege_name_name().
Definition at line 3670 of file acl.c.
References ACL_GRANT_OPTION_FOR, ACL_USAGE, and convert_any_priv_string().
Referenced by has_language_privilege_id(), has_language_privilege_id_id(), has_language_privilege_id_name(), has_language_privilege_name(), has_language_privilege_name_id(), and has_language_privilege_name_name().
Definition at line 4533 of file acl.c.
References ACL_ALTER_SYSTEM, ACL_GRANT_OPTION_FOR, ACL_SET, and convert_any_priv_string().
Referenced by has_parameter_privilege_id_name(), has_parameter_privilege_name(), and has_parameter_privilege_name_name().
Definition at line 1591 of file acl.c.
References ACL_ALTER_SYSTEM, ACL_CONNECT, ACL_CREATE, ACL_CREATE_TEMP, ACL_DELETE, ACL_EXECUTE, ACL_INSERT, ACL_NO_RIGHTS, ACL_REFERENCES, ACL_SELECT, ACL_SET, ACL_TRIGGER, ACL_TRUNCATE, ACL_UPDATE, ACL_USAGE, ereport, errcode(), errmsg(), ERROR, pg_strcasecmp(), and text_to_cstring().
Referenced by makeaclitem().
Definition at line 4711 of file acl.c.
References ACL_CREATE, ACL_GRANT_OPTION_FOR, ACL_USAGE, and convert_any_priv_string().
Referenced by pg_has_role_id(), pg_has_role_id_id(), pg_has_role_id_name(), pg_has_role_name(), pg_has_role_name_id(), and pg_has_role_name_name().
Definition at line 3849 of file acl.c.
References get_namespace_oid(), and text_to_cstring().
Referenced by has_schema_privilege_id_name(), has_schema_privilege_name(), and has_schema_privilege_name_name().
Definition at line 3861 of file acl.c.
References ACL_CREATE, ACL_GRANT_OPTION_FOR, ACL_USAGE, and convert_any_priv_string().
Referenced by has_schema_privilege_id(), has_schema_privilege_id_id(), has_schema_privilege_id_name(), has_schema_privilege_name(), has_schema_privilege_name_id(), and has_schema_privilege_name_name().
Definition at line 2242 of file acl.c.
References ACL_GRANT_OPTION_FOR, ACL_SELECT, ACL_UPDATE, ACL_USAGE, and convert_any_priv_string().
Referenced by has_sequence_privilege_id(), has_sequence_privilege_id_id(), has_sequence_privilege_id_name(), has_sequence_privilege_name(), has_sequence_privilege_name_id(), and has_sequence_privilege_name_name().
Definition at line 4042 of file acl.c.
References get_foreign_server_oid(), and text_to_cstring().
Referenced by has_server_privilege_id_name(), has_server_privilege_name(), and has_server_privilege_name_name().
Definition at line 4054 of file acl.c.
References ACL_GRANT_OPTION_FOR, ACL_USAGE, and convert_any_priv_string().
Referenced by has_server_privilege_id(), has_server_privilege_id_id(), has_server_privilege_id_name(), has_server_privilege_name(), has_server_privilege_name_id(), and has_server_privilege_name_name().
Definition at line 2004 of file acl.c.
References makeRangeVarFromNameList(), NoLock, RangeVarGetRelid, and textToQualifiedNameList().
Referenced by has_any_column_privilege_id_name(), has_any_column_privilege_name(), has_any_column_privilege_name_name(), has_column_privilege_id_name_attnum(), has_column_privilege_id_name_name(), has_column_privilege_name_attnum(), has_column_privilege_name_name(), has_column_privilege_name_name_attnum(), has_column_privilege_name_name_name(), has_sequence_privilege_id_name(), has_sequence_privilege_name(), has_sequence_privilege_name_name(), has_table_privilege_id_name(), has_table_privilege_name(), and has_table_privilege_name_name().
Definition at line 2019 of file acl.c.
References ACL_DELETE, ACL_GRANT_OPTION_FOR, ACL_INSERT, ACL_REFERENCES, ACL_SELECT, ACL_TRIGGER, ACL_TRUNCATE, ACL_UPDATE, and convert_any_priv_string().
Referenced by has_table_privilege_id(), has_table_privilege_id_id(), has_table_privilege_id_name(), has_table_privilege_name(), has_table_privilege_name_id(), and has_table_privilege_name_name().
Definition at line 4233 of file acl.c.
References get_tablespace_oid(), and text_to_cstring().
Referenced by has_tablespace_privilege_id_name(), has_tablespace_privilege_name(), and has_tablespace_privilege_name_name().
Definition at line 4245 of file acl.c.
References ACL_CREATE, ACL_GRANT_OPTION_FOR, and convert_any_priv_string().
Referenced by has_tablespace_privilege_id(), has_tablespace_privilege_id_id(), has_tablespace_privilege_id_name(), has_tablespace_privilege_name(), has_tablespace_privilege_name_id(), and has_tablespace_privilege_name_name().
Definition at line 4423 of file acl.c.
References CStringGetDatum, DatumGetObjectId, DirectFunctionCall1, ereport, errcode(), errmsg(), ERROR, OidIsValid, regtypein(), text_to_cstring(), and typname.
Referenced by has_type_privilege_id_name(), has_type_privilege_name(), and has_type_privilege_name_name().
Definition at line 4444 of file acl.c.
References ACL_GRANT_OPTION_FOR, ACL_USAGE, and convert_any_priv_string().
Referenced by has_type_privilege_id(), has_type_privilege_id_id(), has_type_privilege_id_name(), has_type_privilege_name(), has_type_privilege_name_id(), and has_type_privilege_name_name().
|
static |
Definition at line 5177 of file acl.c.
References AUTHNAME, CStringGetDatum, ereport, errcode(), errmsg(), ERROR, GetSysCacheOid1, OidIsValid, and rolname.
Referenced by aclparse(), check_hba(), createdb(), CreateRole(), get_object_address_unqualified(), get_role_oid_or_public(), get_rolespec_oid(), GrantRole(), is_member(), pg_has_role_id_name(), pg_has_role_name(), pg_has_role_name_id(), pg_has_role_name_name(), regrolein(), shell_check_detail(), and to_regrole().
Oid get_role_oid_or_public | ( | const char * | rolname | ) |
Definition at line 5195 of file acl.c.
References ACL_ID_PUBLIC, get_role_oid(), and rolname.
Referenced by has_any_column_privilege_name_id(), has_any_column_privilege_name_name(), has_column_privilege_name_id_attnum(), has_column_privilege_name_id_name(), has_column_privilege_name_name_attnum(), has_column_privilege_name_name_name(), has_database_privilege_name_id(), has_database_privilege_name_name(), has_foreign_data_wrapper_privilege_name_id(), has_foreign_data_wrapper_privilege_name_name(), has_function_privilege_name_id(), has_function_privilege_name_name(), has_language_privilege_name_id(), has_language_privilege_name_name(), has_parameter_privilege_name_name(), has_schema_privilege_name_id(), has_schema_privilege_name_name(), has_sequence_privilege_name_id(), has_sequence_privilege_name_name(), has_server_privilege_name_id(), has_server_privilege_name_name(), has_table_privilege_name_id(), has_table_privilege_name_name(), has_tablespace_privilege_name_id(), has_tablespace_privilege_name_name(), has_type_privilege_name_id(), and has_type_privilege_name_name().
char* get_rolespec_name | ( | const RoleSpec * | role | ) |
Definition at line 5296 of file acl.c.
References get_rolespec_tuple(), GETSTRUCT, NameStr, pstrdup(), and ReleaseSysCache().
Referenced by AddRoleMems(), and DelRoleMems().
Definition at line 5211 of file acl.c.
References Assert(), elog, ereport, errcode(), errmsg(), ERROR, get_role_oid(), GetSessionUserId(), GetUserId(), InvalidOid, RoleSpec::rolename, ROLESPEC_CSTRING, ROLESPEC_CURRENT_ROLE, ROLESPEC_CURRENT_USER, ROLESPEC_PUBLIC, ROLESPEC_SESSION_USER, and RoleSpec::roletype.
Referenced by AlterUserMapping(), ATExecCmd(), CreateSchemaCommand(), CreateTableSpace(), CreateUserMapping(), ExecAlterDefaultPrivilegesStmt(), ExecAlterOwnerStmt(), ExecuteGrantStmt(), GrantRole(), policy_role_list_to_array(), ReassignOwnedObjects(), RemoveUserMapping(), and roleSpecsToIds().
Definition at line 5250 of file acl.c.
References Assert(), AUTHNAME, AUTHOID, CStringGetDatum, elog, ereport, errcode(), errmsg(), ERROR, GetSessionUserId(), GetUserId(), HeapTupleIsValid, RoleSpec::rolename, ROLESPEC_CSTRING, ROLESPEC_CURRENT_ROLE, ROLESPEC_CURRENT_USER, ROLESPEC_PUBLIC, ROLESPEC_SESSION_USER, RoleSpec::roletype, and SearchSysCache1().
Referenced by AlterRole(), AlterRoleSet(), CreateRole(), and get_rolespec_name().
|
static |
Definition at line 134 of file acl.c.
References Assert(), ereport, errcode(), errdetail(), errmsg(), ERROR, len, and NAMEDATALEN.
Referenced by aclparse().
Datum has_any_column_privilege_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2364 of file acl.c.
References ACLCHECK_OK, ACLMASK_ANY, convert_column_priv_string(), GetUserId(), mode, ObjectIdGetDatum, pg_attribute_aclcheck_all(), pg_class_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, RELOID, and SearchSysCacheExists1.
Datum has_any_column_privilege_id_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2420 of file acl.c.
References ACLCHECK_OK, ACLMASK_ANY, convert_column_priv_string(), mode, ObjectIdGetDatum, pg_attribute_aclcheck_all(), pg_class_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, RELOID, and SearchSysCacheExists1.
Datum has_any_column_privilege_id_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2393 of file acl.c.
References ACLCHECK_OK, ACLMASK_ANY, convert_column_priv_string(), convert_table_name(), mode, pg_attribute_aclcheck_all(), pg_class_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum has_any_column_privilege_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2305 of file acl.c.
References ACLCHECK_OK, ACLMASK_ANY, convert_column_priv_string(), convert_table_name(), GetUserId(), mode, pg_attribute_aclcheck_all(), pg_class_aclcheck(), PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum has_any_column_privilege_name_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2333 of file acl.c.
References ACLCHECK_OK, ACLMASK_ANY, convert_column_priv_string(), get_role_oid_or_public(), mode, NameStr, ObjectIdGetDatum, pg_attribute_aclcheck_all(), pg_class_aclcheck(), PG_GETARG_NAME, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, RELOID, SearchSysCacheExists1, and username.
Datum has_any_column_privilege_name_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2275 of file acl.c.
References ACLCHECK_OK, ACLMASK_ANY, convert_column_priv_string(), convert_table_name(), get_role_oid_or_public(), mode, NameStr, pg_attribute_aclcheck_all(), pg_class_aclcheck(), PG_GETARG_NAME, PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum has_column_privilege_id_attnum | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2799 of file acl.c.
References column_privilege_check(), convert_column_priv_string(), GetUserId(), mode, PG_GETARG_INT16, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and PG_RETURN_NULL.
Datum has_column_privilege_id_id_attnum | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2692 of file acl.c.
References column_privilege_check(), convert_column_priv_string(), mode, PG_GETARG_INT16, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and PG_RETURN_NULL.
Datum has_column_privilege_id_id_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2667 of file acl.c.
References column_privilege_check(), convert_column_name(), convert_column_priv_string(), mode, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and PG_RETURN_NULL.
Datum has_column_privilege_id_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2772 of file acl.c.
References column_privilege_check(), convert_column_name(), convert_column_priv_string(), GetUserId(), mode, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and PG_RETURN_NULL.
Datum has_column_privilege_id_name_attnum | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2642 of file acl.c.
References column_privilege_check(), convert_column_priv_string(), convert_table_name(), mode, PG_GETARG_INT16, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and PG_RETURN_NULL.
Datum has_column_privilege_id_name_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2615 of file acl.c.
References column_privilege_check(), convert_column_name(), convert_column_priv_string(), convert_table_name(), mode, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and PG_RETURN_NULL.
Datum has_column_privilege_name_attnum | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2745 of file acl.c.
References column_privilege_check(), convert_column_priv_string(), convert_table_name(), GetUserId(), mode, PG_GETARG_INT16, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and PG_RETURN_NULL.
Datum has_column_privilege_name_id_attnum | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2590 of file acl.c.
References column_privilege_check(), convert_column_priv_string(), get_role_oid_or_public(), mode, NameStr, PG_GETARG_INT16, PG_GETARG_NAME, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, and username.
Datum has_column_privilege_name_id_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2563 of file acl.c.
References column_privilege_check(), convert_column_name(), convert_column_priv_string(), get_role_oid_or_public(), mode, NameStr, PG_GETARG_NAME, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, and username.
Datum has_column_privilege_name_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2716 of file acl.c.
References column_privilege_check(), convert_column_name(), convert_column_priv_string(), convert_table_name(), GetUserId(), mode, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and PG_RETURN_NULL.
Datum has_column_privilege_name_name_attnum | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2536 of file acl.c.
References column_privilege_check(), convert_column_priv_string(), convert_table_name(), get_role_oid_or_public(), mode, NameStr, PG_GETARG_INT16, PG_GETARG_NAME, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and PG_RETURN_NULL.
Datum has_column_privilege_name_name_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2507 of file acl.c.
References column_privilege_check(), convert_column_name(), convert_column_priv_string(), convert_table_name(), get_role_oid_or_public(), mode, NameStr, PG_GETARG_NAME, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and PG_RETURN_NULL.
Datum has_database_privilege_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2996 of file acl.c.
References ACLCHECK_OK, convert_database_priv_string(), DATABASEOID, GetUserId(), mode, ObjectIdGetDatum, pg_database_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, and SearchSysCacheExists1.
Datum has_database_privilege_id_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3044 of file acl.c.
References ACLCHECK_OK, convert_database_priv_string(), DATABASEOID, mode, ObjectIdGetDatum, pg_database_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, and SearchSysCacheExists1.
Datum has_database_privilege_id_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3021 of file acl.c.
References ACLCHECK_OK, convert_database_name(), convert_database_priv_string(), mode, pg_database_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum has_database_privilege_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2945 of file acl.c.
References ACLCHECK_OK, convert_database_name(), convert_database_priv_string(), GetUserId(), mode, pg_database_aclcheck(), PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum has_database_privilege_name_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2969 of file acl.c.
References ACLCHECK_OK, convert_database_priv_string(), DATABASEOID, get_role_oid_or_public(), mode, NameStr, ObjectIdGetDatum, pg_database_aclcheck(), PG_GETARG_NAME, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, SearchSysCacheExists1, and username.
Datum has_database_privilege_name_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2919 of file acl.c.
References ACLCHECK_OK, convert_database_name(), convert_database_priv_string(), get_role_oid_or_public(), mode, NameStr, pg_database_aclcheck(), PG_GETARG_NAME, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and username.
Datum has_foreign_data_wrapper_privilege_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3193 of file acl.c.
References ACLCHECK_OK, convert_foreign_data_wrapper_priv_string(), FOREIGNDATAWRAPPEROID, GetUserId(), mode, ObjectIdGetDatum, pg_foreign_data_wrapper_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, and SearchSysCacheExists1.
Datum has_foreign_data_wrapper_privilege_id_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3241 of file acl.c.
References ACLCHECK_OK, convert_foreign_data_wrapper_priv_string(), FOREIGNDATAWRAPPEROID, mode, ObjectIdGetDatum, pg_foreign_data_wrapper_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, and SearchSysCacheExists1.
Datum has_foreign_data_wrapper_privilege_id_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3218 of file acl.c.
References ACLCHECK_OK, convert_foreign_data_wrapper_name(), convert_foreign_data_wrapper_priv_string(), mode, pg_foreign_data_wrapper_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum has_foreign_data_wrapper_privilege_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3142 of file acl.c.
References ACLCHECK_OK, convert_foreign_data_wrapper_name(), convert_foreign_data_wrapper_priv_string(), GetUserId(), mode, pg_foreign_data_wrapper_aclcheck(), PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum has_foreign_data_wrapper_privilege_name_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3166 of file acl.c.
References ACLCHECK_OK, convert_foreign_data_wrapper_priv_string(), FOREIGNDATAWRAPPEROID, get_role_oid_or_public(), mode, NameStr, ObjectIdGetDatum, pg_foreign_data_wrapper_aclcheck(), PG_GETARG_NAME, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, SearchSysCacheExists1, and username.
Datum has_foreign_data_wrapper_privilege_name_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3116 of file acl.c.
References ACLCHECK_OK, convert_foreign_data_wrapper_name(), convert_foreign_data_wrapper_priv_string(), get_role_oid_or_public(), mode, NameStr, pg_foreign_data_wrapper_aclcheck(), PG_GETARG_NAME, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and username.
Datum has_function_privilege_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3384 of file acl.c.
References ACLCHECK_OK, convert_function_priv_string(), GetUserId(), mode, ObjectIdGetDatum, PG_GETARG_OID, PG_GETARG_TEXT_PP, pg_proc_aclcheck(), PG_RETURN_BOOL, PG_RETURN_NULL, PROCOID, and SearchSysCacheExists1.
Datum has_function_privilege_id_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3432 of file acl.c.
References ACLCHECK_OK, convert_function_priv_string(), mode, ObjectIdGetDatum, PG_GETARG_OID, PG_GETARG_TEXT_PP, pg_proc_aclcheck(), PG_RETURN_BOOL, PG_RETURN_NULL, PROCOID, and SearchSysCacheExists1.
Datum has_function_privilege_id_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3409 of file acl.c.
References ACLCHECK_OK, convert_function_name(), convert_function_priv_string(), mode, PG_GETARG_OID, PG_GETARG_TEXT_PP, pg_proc_aclcheck(), and PG_RETURN_BOOL.
Datum has_function_privilege_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3333 of file acl.c.
References ACLCHECK_OK, convert_function_name(), convert_function_priv_string(), GetUserId(), mode, PG_GETARG_TEXT_PP, pg_proc_aclcheck(), and PG_RETURN_BOOL.
Datum has_function_privilege_name_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3357 of file acl.c.
References ACLCHECK_OK, convert_function_priv_string(), get_role_oid_or_public(), mode, NameStr, ObjectIdGetDatum, PG_GETARG_NAME, PG_GETARG_OID, PG_GETARG_TEXT_PP, pg_proc_aclcheck(), PG_RETURN_BOOL, PG_RETURN_NULL, PROCOID, SearchSysCacheExists1, and username.
Datum has_function_privilege_name_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3307 of file acl.c.
References ACLCHECK_OK, convert_function_name(), convert_function_priv_string(), get_role_oid_or_public(), mode, NameStr, PG_GETARG_NAME, PG_GETARG_TEXT_PP, pg_proc_aclcheck(), PG_RETURN_BOOL, and username.
Datum has_language_privilege_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3584 of file acl.c.
References ACLCHECK_OK, convert_language_priv_string(), GetUserId(), LANGOID, mode, ObjectIdGetDatum, PG_GETARG_OID, PG_GETARG_TEXT_PP, pg_language_aclcheck(), PG_RETURN_BOOL, PG_RETURN_NULL, and SearchSysCacheExists1.
Datum has_language_privilege_id_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3632 of file acl.c.
References ACLCHECK_OK, convert_language_priv_string(), LANGOID, mode, ObjectIdGetDatum, PG_GETARG_OID, PG_GETARG_TEXT_PP, pg_language_aclcheck(), PG_RETURN_BOOL, PG_RETURN_NULL, and SearchSysCacheExists1.
Datum has_language_privilege_id_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3609 of file acl.c.
References ACLCHECK_OK, convert_language_name(), convert_language_priv_string(), mode, PG_GETARG_OID, PG_GETARG_TEXT_PP, pg_language_aclcheck(), and PG_RETURN_BOOL.
Datum has_language_privilege_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3533 of file acl.c.
References ACLCHECK_OK, convert_language_name(), convert_language_priv_string(), GetUserId(), mode, PG_GETARG_TEXT_PP, pg_language_aclcheck(), and PG_RETURN_BOOL.
Datum has_language_privilege_name_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3557 of file acl.c.
References ACLCHECK_OK, convert_language_priv_string(), get_role_oid_or_public(), LANGOID, mode, NameStr, ObjectIdGetDatum, PG_GETARG_NAME, PG_GETARG_OID, PG_GETARG_TEXT_PP, pg_language_aclcheck(), PG_RETURN_BOOL, PG_RETURN_NULL, SearchSysCacheExists1, and username.
Datum has_language_privilege_name_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3507 of file acl.c.
References ACLCHECK_OK, convert_language_name(), convert_language_priv_string(), get_role_oid_or_public(), mode, NameStr, PG_GETARG_NAME, PG_GETARG_TEXT_PP, pg_language_aclcheck(), PG_RETURN_BOOL, and username.
Definition at line 4472 of file acl.c.
References ACLCHECK_OK, pg_parameter_aclcheck(), and text_to_cstring().
Referenced by has_parameter_privilege_id_name(), has_parameter_privilege_name(), and has_parameter_privilege_name_name().
Datum has_parameter_privilege_id_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4515 of file acl.c.
References convert_parameter_priv_string(), has_param_priv_byname(), PG_GETARG_OID, PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum has_parameter_privilege_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4501 of file acl.c.
References convert_parameter_priv_string(), GetUserId(), has_param_priv_byname(), PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum has_parameter_privilege_name_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4485 of file acl.c.
References convert_parameter_priv_string(), get_role_oid_or_public(), has_param_priv_byname(), NameStr, PG_GETARG_NAME, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and username.
Definition at line 4951 of file acl.c.
References InvalidOid, list_member_oid(), ROLERECURSE_PRIVS, roles_is_member_of(), and superuser_arg().
Referenced by aclmask(), AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), bbsink_server_new(), calculate_database_size(), calculate_tablespace_size(), check_role_for_policy(), convert_and_check_filename(), DoCopy(), DropOwnedObjects(), file_fdw_validator(), get_explain_guc_options(), GetConfigOption(), GetConfigOptionByName(), GetConfigOptionByNum(), GetConfigOptionResetString(), pg_class_aclmask_ext(), pg_class_ownercheck(), pg_collation_ownercheck(), pg_conversion_ownercheck(), pg_database_ownercheck(), pg_event_trigger_ownercheck(), pg_extension_ownercheck(), pg_foreign_data_wrapper_ownercheck(), pg_foreign_server_ownercheck(), pg_language_ownercheck(), pg_largeobject_ownercheck(), pg_namespace_aclmask(), pg_namespace_ownercheck(), pg_opclass_ownercheck(), pg_oper_ownercheck(), pg_opfamily_ownercheck(), pg_proc_ownercheck(), pg_publication_ownercheck(), pg_role_aclcheck(), pg_signal_backend(), pg_stat_get_wal_receiver(), pg_stat_get_wal_senders(), pg_stat_statements_internal(), pg_statistics_object_ownercheck(), pg_subscription_ownercheck(), pg_tablespace_ownercheck(), pg_ts_config_ownercheck(), pg_ts_dict_ownercheck(), pg_type_ownercheck(), pgrowlocks(), ReassignOwnedObjects(), shell_check_detail(), ShowAllGUCConfig(), standard_ProcessUtility(), and TerminateOtherDBBackends().
Definition at line 4803 of file acl.c.
References AUTHOID, GETSTRUCT, HeapTupleIsValid, ObjectIdGetDatum, ReleaseSysCache(), rolinherit, and SearchSysCache1().
Referenced by roles_is_member_of().
Datum has_schema_privilege_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3775 of file acl.c.
References ACLCHECK_OK, convert_schema_priv_string(), GetUserId(), mode, NAMESPACEOID, ObjectIdGetDatum, PG_GETARG_OID, PG_GETARG_TEXT_PP, pg_namespace_aclcheck(), PG_RETURN_BOOL, PG_RETURN_NULL, and SearchSysCacheExists1.
Datum has_schema_privilege_id_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3823 of file acl.c.
References ACLCHECK_OK, convert_schema_priv_string(), mode, NAMESPACEOID, ObjectIdGetDatum, PG_GETARG_OID, PG_GETARG_TEXT_PP, pg_namespace_aclcheck(), PG_RETURN_BOOL, PG_RETURN_NULL, and SearchSysCacheExists1.
Datum has_schema_privilege_id_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3800 of file acl.c.
References ACLCHECK_OK, convert_schema_name(), convert_schema_priv_string(), mode, PG_GETARG_OID, PG_GETARG_TEXT_PP, pg_namespace_aclcheck(), and PG_RETURN_BOOL.
Datum has_schema_privilege_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3724 of file acl.c.
References ACLCHECK_OK, convert_schema_name(), convert_schema_priv_string(), GetUserId(), mode, PG_GETARG_TEXT_PP, pg_namespace_aclcheck(), and PG_RETURN_BOOL.
Datum has_schema_privilege_name_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3748 of file acl.c.
References ACLCHECK_OK, convert_schema_priv_string(), get_role_oid_or_public(), mode, NAMESPACEOID, NameStr, ObjectIdGetDatum, PG_GETARG_NAME, PG_GETARG_OID, PG_GETARG_TEXT_PP, pg_namespace_aclcheck(), PG_RETURN_BOOL, PG_RETURN_NULL, SearchSysCacheExists1, and username.
Datum has_schema_privilege_name_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3698 of file acl.c.
References ACLCHECK_OK, convert_schema_name(), convert_schema_priv_string(), get_role_oid_or_public(), mode, NameStr, PG_GETARG_NAME, PG_GETARG_TEXT_PP, pg_namespace_aclcheck(), PG_RETURN_BOOL, and username.
Datum has_sequence_privilege_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2154 of file acl.c.
References ACLCHECK_OK, convert_sequence_priv_string(), ereport, errcode(), errmsg(), ERROR, get_rel_name(), get_rel_relkind(), GetUserId(), mode, pg_class_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and PG_RETURN_NULL.
Datum has_sequence_privilege_id_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2213 of file acl.c.
References ACLCHECK_OK, convert_sequence_priv_string(), ereport, errcode(), errmsg(), ERROR, get_rel_name(), get_rel_relkind(), mode, pg_class_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and PG_RETURN_NULL.
Datum has_sequence_privilege_id_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2185 of file acl.c.
References ACLCHECK_OK, convert_sequence_priv_string(), convert_table_name(), ereport, errcode(), errmsg(), ERROR, get_rel_relkind(), mode, pg_class_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and text_to_cstring().
Datum has_sequence_privilege_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2092 of file acl.c.
References ACLCHECK_OK, convert_sequence_priv_string(), convert_table_name(), ereport, errcode(), errmsg(), ERROR, get_rel_relkind(), GetUserId(), mode, pg_class_aclcheck(), PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and text_to_cstring().
Datum has_sequence_privilege_name_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2121 of file acl.c.
References ACLCHECK_OK, convert_sequence_priv_string(), ereport, errcode(), errmsg(), ERROR, get_rel_name(), get_rel_relkind(), get_role_oid_or_public(), mode, NameStr, pg_class_aclcheck(), PG_GETARG_NAME, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, and username.
Datum has_sequence_privilege_name_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2061 of file acl.c.
References ACLCHECK_OK, convert_sequence_priv_string(), convert_table_name(), ereport, errcode(), errmsg(), ERROR, get_rel_relkind(), get_role_oid_or_public(), mode, NameStr, pg_class_aclcheck(), PG_GETARG_NAME, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and text_to_cstring().
Datum has_server_privilege_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3968 of file acl.c.
References ACLCHECK_OK, convert_server_priv_string(), FOREIGNSERVEROID, GetUserId(), mode, ObjectIdGetDatum, pg_foreign_server_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, and SearchSysCacheExists1.
Datum has_server_privilege_id_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4016 of file acl.c.
References ACLCHECK_OK, convert_server_priv_string(), FOREIGNSERVEROID, mode, ObjectIdGetDatum, pg_foreign_server_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, and SearchSysCacheExists1.
Datum has_server_privilege_id_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3993 of file acl.c.
References ACLCHECK_OK, convert_server_name(), convert_server_priv_string(), mode, pg_foreign_server_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum has_server_privilege_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3917 of file acl.c.
References ACLCHECK_OK, convert_server_name(), convert_server_priv_string(), GetUserId(), mode, pg_foreign_server_aclcheck(), PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum has_server_privilege_name_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3941 of file acl.c.
References ACLCHECK_OK, convert_server_priv_string(), FOREIGNSERVEROID, get_role_oid_or_public(), mode, NameStr, ObjectIdGetDatum, pg_foreign_server_aclcheck(), PG_GETARG_NAME, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, SearchSysCacheExists1, and username.
Datum has_server_privilege_name_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3891 of file acl.c.
References ACLCHECK_OK, convert_server_name(), convert_server_priv_string(), get_role_oid_or_public(), mode, NameStr, pg_foreign_server_aclcheck(), PG_GETARG_NAME, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, and username.
Datum has_table_privilege_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1930 of file acl.c.
References ACLCHECK_OK, convert_table_priv_string(), GetUserId(), mode, ObjectIdGetDatum, pg_class_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, RELOID, and SearchSysCacheExists1.
Datum has_table_privilege_id_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1978 of file acl.c.
References ACLCHECK_OK, convert_table_priv_string(), mode, ObjectIdGetDatum, pg_class_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, RELOID, and SearchSysCacheExists1.
Datum has_table_privilege_id_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1955 of file acl.c.
References ACLCHECK_OK, convert_table_name(), convert_table_priv_string(), mode, pg_class_aclcheck(), PG_GETARG_OID, PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum has_table_privilege_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1879 of file acl.c.
References ACLCHECK_OK, convert_table_name(), convert_table_priv_string(), GetUserId(), mode, pg_class_aclcheck(), PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum has_table_privilege_name_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1903 of file acl.c.
References ACLCHECK_OK, convert_table_priv_string(), get_role_oid_or_public(), mode, NameStr, ObjectIdGetDatum, pg_class_aclcheck(), PG_GETARG_NAME, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, RELOID, SearchSysCacheExists1, and username.
Datum has_table_privilege_name_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1853 of file acl.c.
References ACLCHECK_OK, convert_table_name(), convert_table_priv_string(), get_role_oid_or_public(), mode, NameStr, pg_class_aclcheck(), PG_GETARG_NAME, PG_GETARG_TEXT_PP, and PG_RETURN_BOOL.
Datum has_tablespace_privilege_id | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4159 of file acl.c.
References ACLCHECK_OK, convert_tablespace_priv_string(), GetUserId(), mode, ObjectIdGetDatum, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_BOOL, PG_RETURN_NULL, pg_tablespace_aclcheck(), SearchSysCacheExists1, and TABLESPACEOID.
Datum has_tablespace_privilege_id_id | ( | PG_FUNCTION_ARGS | ) |