|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/genam.h"#include "access/htup_details.h"#include "access/relation.h"#include "access/table.h"#include "catalog/catalog.h"#include "catalog/objectaddress.h"#include "catalog/pg_am.h"#include "catalog/pg_amop.h"#include "catalog/pg_amproc.h"#include "catalog/pg_attrdef.h"#include "catalog/pg_authid.h"#include "catalog/pg_auth_members.h"#include "catalog/pg_cast.h"#include "catalog/pg_collation.h"#include "catalog/pg_constraint.h"#include "catalog/pg_conversion.h"#include "catalog/pg_database.h"#include "catalog/pg_default_acl.h"#include "catalog/pg_event_trigger.h"#include "catalog/pg_extension.h"#include "catalog/pg_foreign_data_wrapper.h"#include "catalog/pg_foreign_server.h"#include "catalog/pg_language.h"#include "catalog/pg_largeobject.h"#include "catalog/pg_largeobject_metadata.h"#include "catalog/pg_namespace.h"#include "catalog/pg_opclass.h"#include "catalog/pg_operator.h"#include "catalog/pg_opfamily.h"#include "catalog/pg_parameter_acl.h"#include "catalog/pg_policy.h"#include "catalog/pg_proc.h"#include "catalog/pg_propgraph_element.h"#include "catalog/pg_propgraph_element_label.h"#include "catalog/pg_propgraph_label.h"#include "catalog/pg_propgraph_label_property.h"#include "catalog/pg_propgraph_property.h"#include "catalog/pg_publication.h"#include "catalog/pg_publication_namespace.h"#include "catalog/pg_publication_rel.h"#include "catalog/pg_rewrite.h"#include "catalog/pg_statistic_ext.h"#include "catalog/pg_subscription.h"#include "catalog/pg_tablespace.h"#include "catalog/pg_transform.h"#include "catalog/pg_trigger.h"#include "catalog/pg_ts_config.h"#include "catalog/pg_ts_dict.h"#include "catalog/pg_ts_parser.h"#include "catalog/pg_ts_template.h"#include "catalog/pg_type.h"#include "catalog/pg_user_mapping.h"#include "commands/defrem.h"#include "commands/event_trigger.h"#include "commands/extension.h"#include "commands/policy.h"#include "commands/proclang.h"#include "commands/tablespace.h"#include "commands/trigger.h"#include "foreign/foreign.h"#include "funcapi.h"#include "miscadmin.h"#include "parser/parse_func.h"#include "parser/parse_oper.h"#include "parser/parse_type.h"#include "rewrite/rewriteSupport.h"#include "storage/large_object.h"#include "storage/lmgr.h"#include "storage/sinval.h"#include "utils/acl.h"#include "utils/builtins.h"#include "utils/fmgroids.h"#include "utils/lsyscache.h"#include "utils/memutils.h"#include "utils/regproc.h"#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
| struct | ObjectPropertyType |
| struct | object_type_map |
Variables | |
| static const ObjectPropertyType | ObjectProperty [] |
| static const struct object_type_map | ObjectTypeMap [] |
| const ObjectAddress | InvalidObjectAddress |
| void check_object_ownership | ( | Oid | roleid, |
| ObjectType | objtype, | ||
| ObjectAddress | address, | ||
| Node * | object, | ||
| Relation | relation | ||
| ) |
Definition at line 2487 of file objectaddress.c.
References aclcheck_error(), aclcheck_error_type(), ACLCHECK_NOT_OWNER, castNode, ObjectAddress::classId, elog, ereport, errcode(), errdetail(), errmsg, ERROR, fb(), Form_pg_constraint, format_type_be(), GETSTRUCT(), GetUserNameFromId(), has_createrole_privilege(), HeapTupleIsValid, is_admin_of_role(), linitial_node, lo_compat_privileges, lsecond_node, NameListToString(), OBJECT_ACCESS_METHOD, OBJECT_AGGREGATE, OBJECT_AMOP, OBJECT_AMPROC, OBJECT_ATTRIBUTE, OBJECT_CAST, OBJECT_COLLATION, OBJECT_COLUMN, OBJECT_CONVERSION, OBJECT_DATABASE, OBJECT_DEFACL, OBJECT_DEFAULT, OBJECT_DOMAIN, OBJECT_DOMCONSTRAINT, OBJECT_EVENT_TRIGGER, OBJECT_EXTENSION, OBJECT_FDW, OBJECT_FOREIGN_SERVER, OBJECT_FOREIGN_TABLE, OBJECT_FUNCTION, OBJECT_INDEX, OBJECT_LANGUAGE, OBJECT_LARGEOBJECT, OBJECT_MATVIEW, OBJECT_OPCLASS, OBJECT_OPERATOR, OBJECT_OPFAMILY, object_ownercheck(), OBJECT_PARAMETER_ACL, OBJECT_POLICY, OBJECT_PROCEDURE, OBJECT_PROPGRAPH, OBJECT_PUBLICATION, OBJECT_PUBLICATION_NAMESPACE, OBJECT_PUBLICATION_REL, OBJECT_ROLE, OBJECT_ROUTINE, OBJECT_RULE, OBJECT_SCHEMA, OBJECT_SEQUENCE, OBJECT_STATISTIC_EXT, OBJECT_SUBSCRIPTION, OBJECT_TABCONSTRAINT, OBJECT_TABLE, OBJECT_TABLESPACE, OBJECT_TRANSFORM, OBJECT_TRIGGER, OBJECT_TSCONFIGURATION, OBJECT_TSDICTIONARY, OBJECT_TSPARSER, OBJECT_TSTEMPLATE, OBJECT_TYPE, OBJECT_USER_MAPPING, OBJECT_VIEW, ObjectAddress::objectId, ObjectIdGetDatum(), RelationGetRelationName, RelationGetRelid, ReleaseSysCache(), SearchSysCache1(), strVal, superuser_arg(), and typenameTypeId().
Referenced by CommentObject(), ExecAlterExtensionContentsStmt(), ExecAlterObjectDependsStmt(), ExecSecLabelStmt(), and RemoveObjects().
| HeapTuple get_catalog_object_by_oid | ( | Relation | catalog, |
| AttrNumber | oidcol, | ||
| Oid | objectId | ||
| ) |
Definition at line 2887 of file objectaddress.c.
References fb(), and get_catalog_object_by_oid_extended().
Referenced by getConstraintTypeDescription(), getObjectIdentityParts(), obtain_object_name_namespace(), pg_event_trigger_ddl_commands(), pg_get_acl(), and pg_identify_object().
| HeapTuple get_catalog_object_by_oid_extended | ( | Relation | catalog, |
| AttrNumber | oidcol, | ||
| Oid | objectId, | ||
| bool | locktup | ||
| ) |
Definition at line 2900 of file objectaddress.c.
References Assert, BTEqualStrategyNumber, fb(), get_object_catcache_oid(), get_object_oid_index(), heap_copytuple(), HeapTupleIsValid, InplaceUpdateTupleLock, LockTuple(), ObjectIdGetDatum(), OidIsValid, RelationGetRelid, ScanKeyInit(), SearchSysCacheCopy1, SearchSysCacheLockedCopy1(), systable_beginscan(), systable_endscan(), systable_getnext(), and HeapTupleData::t_self.
Referenced by AlterObjectOwner_internal(), and get_catalog_object_by_oid().
| ObjectAddress get_object_address | ( | ObjectType | objtype, |
| Node * | object, | ||
| Relation * | relp, | ||
| LOCKMODE | lockmode, | ||
| bool | missing_ok | ||
| ) |
Definition at line 1010 of file objectaddress.c.
References Assert, castNode, ObjectAddress::classId, elog, ereport, errcode(), errmsg, ERROR, fb(), get_cast_oid(), get_collation_oid(), get_conversion_oid(), get_domain_constraint_oid(), get_language_oid(), get_object_address_attrdef(), get_object_address_attribute(), get_object_address_defacl(), get_object_address_opcf(), get_object_address_opf_member(), get_object_address_publication_rel(), get_object_address_publication_schema(), get_object_address_relobject(), get_object_address_type(), get_object_address_unqualified(), get_object_address_usermapping(), get_relation_by_qualified_name(), get_statistics_object_oid(), get_transform_oid(), get_ts_config_oid(), get_ts_dict_oid(), get_ts_parser_oid(), get_ts_template_oid(), InvalidOid, IsSharedRelation(), LargeObjectExists(), linitial_node, LockDatabaseObject(), LockSharedObject(), LookupFuncWithArgs(), LookupOperWithArgs(), LookupTypeNameOid(), lsecond, lsecond_node, NoLock, OBJECT_ACCESS_METHOD, OBJECT_AGGREGATE, OBJECT_AMOP, OBJECT_AMPROC, OBJECT_ATTRIBUTE, OBJECT_CAST, OBJECT_COLLATION, OBJECT_COLUMN, OBJECT_CONVERSION, OBJECT_DATABASE, OBJECT_DEFACL, OBJECT_DEFAULT, OBJECT_DOMAIN, OBJECT_DOMCONSTRAINT, OBJECT_EVENT_TRIGGER, OBJECT_EXTENSION, OBJECT_FDW, OBJECT_FOREIGN_SERVER, OBJECT_FOREIGN_TABLE, OBJECT_FUNCTION, OBJECT_INDEX, OBJECT_LANGUAGE, OBJECT_LARGEOBJECT, OBJECT_MATVIEW, OBJECT_OPCLASS, OBJECT_OPERATOR, OBJECT_OPFAMILY, OBJECT_PARAMETER_ACL, OBJECT_POLICY, OBJECT_PROCEDURE, OBJECT_PROPGRAPH, OBJECT_PUBLICATION, OBJECT_PUBLICATION_NAMESPACE, OBJECT_PUBLICATION_REL, OBJECT_ROLE, OBJECT_ROUTINE, OBJECT_RULE, OBJECT_SCHEMA, OBJECT_SEQUENCE, OBJECT_STATISTIC_EXT, OBJECT_SUBSCRIPTION, OBJECT_TABCONSTRAINT, OBJECT_TABLE, OBJECT_TABLESPACE, OBJECT_TRANSFORM, OBJECT_TRIGGER, OBJECT_TSCONFIGURATION, OBJECT_TSDICTIONARY, OBJECT_TSPARSER, OBJECT_TSTEMPLATE, OBJECT_TYPE, OBJECT_USER_MAPPING, OBJECT_VIEW, ObjectAddress::objectId, ObjectAddress::objectSubId, OidIsValid, oidparse(), SharedInvalidMessageCounter, strVal, UnlockDatabaseObject(), and UnlockSharedObject().
Referenced by CommentObject(), ExecAlterExtensionContentsStmt(), ExecAlterObjectDependsStmt(), ExecAlterObjectSchemaStmt(), ExecAlterOwnerStmt(), ExecRenameStmt(), ExecSecLabelStmt(), get_object_address_rv(), objectNamesToOids(), pg_get_object_address(), and RemoveObjects().
|
static |
Definition at line 1645 of file objectaddress.c.
References attname, attnum, ObjectAddress::classId, TupleDescData::constr, ereport, errcode(), errmsg, ERROR, fb(), get_attnum(), GetAttrDefaultOid(), InvalidAttrNumber, InvalidOid, list_copy_head(), list_length(), llast, makeRangeVarFromNameList(), NameListToString(), ObjectAddress::objectId, ObjectAddress::objectSubId, OidIsValid, relation_close(), relation_openrv(), RelationGetDescr, RelationGetRelid, relname, and strVal.
Referenced by get_object_address().
|
static |
Definition at line 1594 of file objectaddress.c.
References attname, attnum, ObjectAddress::classId, ereport, errcode(), errmsg, ERROR, fb(), get_attnum(), InvalidAttrNumber, InvalidOid, list_copy_head(), list_length(), llast, makeRangeVarFromNameList(), NameListToString(), ObjectAddress::objectId, ObjectAddress::objectSubId, relation_close(), relation_openrv(), RelationGetRelid, relname, and strVal.
Referenced by get_object_address().
|
static |
Definition at line 2058 of file objectaddress.c.
References CharGetDatum(), CStringGetDatum(), ereport, errcode(), errhint(), errmsg, ERROR, fb(), Form_pg_authid, Form_pg_default_acl, get_namespace_oid(), GETSTRUCT(), HeapTupleIsValid, InvalidOid, linitial, list_length(), lsecond, lthird, ObjectAddressSet, ObjectAddress::objectId, ObjectIdGetDatum(), ReleaseSysCache(), SearchSysCache1(), SearchSysCache3(), strVal, and username.
Referenced by get_object_address().
|
static |
Definition at line 1742 of file objectaddress.c.
References ObjectAddress::classId, elog, ERROR, fb(), get_index_am_oid(), get_opclass_oid(), get_opfamily_oid(), InvalidOid, linitial, list_copy_tail(), OBJECT_OPCLASS, OBJECT_OPFAMILY, ObjectAddress::objectId, ObjectAddress::objectSubId, and strVal.
Referenced by get_object_address(), and get_object_address_opf_member().
|
static |
Definition at line 1780 of file objectaddress.c.
References elog, ereport, errcode(), errmsg, ERROR, fb(), Form_pg_amop, Form_pg_amproc, get_object_address_opcf(), get_object_address_type(), getObjectDescription(), GETSTRUCT(), HeapTupleIsValid, i, Int16GetDatum(), InvalidOid, lfirst_node, linitial, list_copy_head(), list_length(), llast, lsecond, OBJECT_AMOP, OBJECT_AMPROC, OBJECT_OPFAMILY, OBJECT_TYPE, ObjectAddressSet, ObjectAddress::objectId, ObjectIdGetDatum(), ReleaseSysCache(), SearchSysCache4(), strVal, typenames, and TypeNameToString().
Referenced by get_object_address().
|
static |
Definition at line 1963 of file objectaddress.c.
References AccessShareLock, ereport, errcode(), errmsg, ERROR, fb(), GetPublicationByName(), GetSysCacheOid2, InvalidOid, linitial, lsecond, makeRangeVarFromNameList(), ObjectAddressSet, ObjectAddress::objectId, ObjectIdGetDatum(), Publication::oid, OidIsValid, relation_close(), relation_openrv_extended(), RelationGetRelationName, RelationGetRelid, relname, and strVal.
Referenced by get_object_address().
|
static |
Definition at line 2016 of file objectaddress.c.
References ereport, errcode(), errmsg, ERROR, fb(), get_namespace_oid(), GetPublicationByName(), GetSysCacheOid2, InvalidOid, linitial, lsecond, ObjectAddressSet, ObjectAddress::objectId, ObjectIdGetDatum(), Publication::oid, OidIsValid, and strVal.
Referenced by get_object_address().
|
static |
Definition at line 1515 of file objectaddress.c.
References AccessShareLock, ObjectAddress::classId, elog, ereport, errcode(), errmsg, ERROR, fb(), get_relation_constraint_oid(), get_relation_policy_oid(), get_rewrite_oid(), get_trigger_oid(), InvalidOid, list_copy_head(), list_length(), llast, makeRangeVarFromNameList(), OBJECT_POLICY, OBJECT_RULE, OBJECT_TABCONSTRAINT, OBJECT_TRIGGER, ObjectAddress::objectId, ObjectAddress::objectSubId, OidIsValid, RelationGetRelid, relname, strVal, table_close(), and table_openrv_extended().
Referenced by get_object_address().
| ObjectAddress get_object_address_rv | ( | ObjectType | objtype, |
| RangeVar * | rel, | ||
| List * | object, | ||
| Relation * | relp, | ||
| LOCKMODE | lockmode, | ||
| bool | missing_ok | ||
| ) |
Definition at line 1313 of file objectaddress.c.
References RangeVar::catalogname, fb(), get_object_address(), lcons(), makeString(), RangeVar::relname, and RangeVar::schemaname.
Referenced by ExecAlterObjectDependsStmt(), and ExecAlterOwnerStmt().
|
static |
Definition at line 1703 of file objectaddress.c.
References ObjectAddress::classId, ereport, errcode(), errmsg, ERROR, fb(), Form_pg_type, GETSTRUCT(), HeapTupleIsValid, InvalidOid, LookupTypeName(), OBJECT_DOMAIN, ObjectAddress::objectId, ObjectAddress::objectSubId, ReleaseSysCache(), TypeNameToString(), and typeTypeId().
Referenced by get_object_address(), and get_object_address_opf_member().
|
static |
Definition at line 1335 of file objectaddress.c.
References ObjectAddress::classId, elog, ERROR, fb(), get_am_oid(), get_database_oid(), get_event_trigger_oid(), get_extension_oid(), get_foreign_data_wrapper_oid(), get_foreign_server_oid(), get_language_oid(), get_namespace_oid(), get_publication_oid(), get_role_oid(), get_subscription_oid(), get_tablespace_oid(), InvalidOid, name, OBJECT_ACCESS_METHOD, OBJECT_DATABASE, OBJECT_EVENT_TRIGGER, OBJECT_EXTENSION, OBJECT_FDW, OBJECT_FOREIGN_SERVER, OBJECT_LANGUAGE, OBJECT_PARAMETER_ACL, OBJECT_PUBLICATION, OBJECT_ROLE, OBJECT_SCHEMA, OBJECT_SUBSCRIPTION, OBJECT_TABLESPACE, ObjectAddress::objectId, ObjectAddress::objectSubId, ParameterAclLookup(), and strVal.
Referenced by get_object_address().
|
static |
Definition at line 1892 of file objectaddress.c.
References CStringGetDatum(), ereport, errcode(), errmsg, ERROR, fb(), Form_pg_authid, Form_pg_user_mapping, GetForeignServerByName(), GETSTRUCT(), HeapTupleIsValid, InvalidOid, linitial, lsecond, ObjectAddressSet, ObjectAddress::objectId, ObjectIdGetDatum(), ReleaseSysCache(), SearchSysCache1(), SearchSysCache2(), ForeignServer::serverid, strVal, and username.
Referenced by get_object_address().
| AttrNumber get_object_attnum_acl | ( | Oid | class_id | ) |
Definition at line 2790 of file objectaddress.c.
References ObjectPropertyType::attnum_acl, fb(), and get_object_property_data().
Referenced by AlterObjectOwner_internal(), ExecGrant_common(), object_aclmask_ext(), pg_get_acl(), and recordExtObjInitPriv().
| AttrNumber get_object_attnum_name | ( | Oid | class_id | ) |
Definition at line 2766 of file objectaddress.c.
References ObjectPropertyType::attnum_name, fb(), and get_object_property_data().
Referenced by AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), ExecGrant_common(), obtain_object_name_namespace(), and pg_identify_object().
| AttrNumber get_object_attnum_namespace | ( | Oid | class_id | ) |
Definition at line 2774 of file objectaddress.c.
References ObjectPropertyType::attnum_namespace, fb(), and get_object_property_data().
Referenced by AlterObjectNamespace_internal(), AlterObjectNamespace_oid(), AlterObjectOwner_internal(), AlterObjectRename_internal(), obtain_object_name_namespace(), pg_event_trigger_ddl_commands(), and pg_identify_object().
| AttrNumber get_object_attnum_oid | ( | Oid | class_id | ) |
Definition at line 2758 of file objectaddress.c.
References ObjectPropertyType::attnum_oid, fb(), and get_object_property_data().
Referenced by AlterObjectOwner_internal(), DropObjectById(), object_ownercheck(), obtain_object_name_namespace(), pg_event_trigger_ddl_commands(), pg_get_acl(), and pg_identify_object().
| AttrNumber get_object_attnum_owner | ( | Oid | class_id | ) |
Definition at line 2782 of file objectaddress.c.
References ObjectPropertyType::attnum_owner, fb(), and get_object_property_data().
Referenced by AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), ExecGrant_common(), object_aclmask_ext(), object_ownercheck(), and RemoveRoleFromInitPriv().
| SysCacheIdentifier get_object_catcache_name | ( | Oid | class_id | ) |
Definition at line 2750 of file objectaddress.c.
References fb(), get_object_property_data(), and ObjectPropertyType::name_catcache_id.
Referenced by AlterObjectNamespace_internal(), and AlterObjectRename_internal().
| SysCacheIdentifier get_object_catcache_oid | ( | Oid | class_id | ) |
Definition at line 2742 of file objectaddress.c.
References fb(), get_object_property_data(), and ObjectPropertyType::oid_catcache_id.
Referenced by AlterObjectNamespace_internal(), AlterObjectRename_internal(), DropObjectById(), ExecGrant_common(), get_catalog_object_by_oid_extended(), object_aclmask_ext(), object_ownercheck(), recordExtObjInitPriv(), and RemoveRoleFromInitPriv().
Definition at line 2726 of file objectaddress.c.
References ObjectPropertyType::class_descr, fb(), and get_object_property_data().
Referenced by DropObjectById(), ExecGrant_common(), object_aclmask_ext(), object_ownercheck(), recordExtObjInitPriv(), and RemoveRoleFromInitPriv().
Definition at line 2823 of file objectaddress.c.
References fb(), get_object_property_data(), and ObjectPropertyType::is_nsp_name_unique.
Referenced by obtain_object_name_namespace(), and pg_identify_object().
| Oid get_object_namespace | ( | const ObjectAddress * | address | ) |
Definition at line 2670 of file objectaddress.c.
References Assert, ObjectAddress::classId, DatumGetObjectId(), elog, ERROR, fb(), get_object_property_data(), HeapTupleIsValid, InvalidAttrNumber, InvalidOid, ObjectAddress::objectId, ObjectIdGetDatum(), ReleaseSysCache(), SearchSysCache1(), and SysCacheGetAttrNotNull().
Referenced by find_temp_object(), and RemoveObjects().
Definition at line 2734 of file objectaddress.c.
References fb(), get_object_property_data(), and ObjectPropertyType::oid_index_oid.
Referenced by DropObjectById(), get_catalog_object_by_oid_extended(), and object_ownercheck().
|
static |
Definition at line 2852 of file objectaddress.c.
References ereport, errmsg_internal(), ERROR, fb(), lengthof, and ObjectProperty.
Referenced by get_object_attnum_acl(), get_object_attnum_name(), get_object_attnum_namespace(), get_object_attnum_oid(), get_object_attnum_owner(), get_object_catcache_name(), get_object_catcache_oid(), get_object_class_descr(), get_object_namensp_unique(), get_object_namespace(), get_object_oid_index(), and get_object_type().
| ObjectType get_object_type | ( | Oid | class_id, |
| Oid | object_id | ||
| ) |
Definition at line 2805 of file objectaddress.c.
References fb(), get_object_property_data(), get_rel_relkind(), get_relkind_objtype(), OBJECT_TABLE, and ObjectPropertyType::objtype.
Referenced by AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), ExecGrant_common(), and object_aclmask_ext().
|
static |
Definition at line 1426 of file objectaddress.c.
References ObjectAddress::classId, elog, ereport, errcode(), errmsg, ERROR, fb(), InvalidOid, makeRangeVarFromNameList(), OBJECT_FOREIGN_TABLE, OBJECT_INDEX, OBJECT_MATVIEW, OBJECT_PROPGRAPH, OBJECT_SEQUENCE, OBJECT_TABLE, OBJECT_VIEW, ObjectAddress::objectId, ObjectAddress::objectSubId, RelationData::rd_rel, relation_openrv_extended(), RelationGetRelationName, and RelationGetRelid.
Referenced by get_object_address().
| ObjectType get_relkind_objtype | ( | char | relkind | ) |
Definition at line 6519 of file objectaddress.c.
References fb(), OBJECT_FOREIGN_TABLE, OBJECT_INDEX, OBJECT_MATVIEW, OBJECT_PROPGRAPH, OBJECT_SEQUENCE, OBJECT_TABLE, and OBJECT_VIEW.
Referenced by AlterTableMoveAll(), ATExecChangeOwner(), ATSimplePermissions(), checkFkeyPermissions(), CreateStatistics(), CreateTriggerFiringOn(), currtid_internal(), DefineQueryRewrite(), EnableDisableRule(), ExecCheckPermissions(), get_object_type(), heap_force_common(), LockViewRecurse_walker(), LogicalRepSyncTableStart(), MergeAttributes(), pg_prewarm(), pgrowlocks(), PublicationAddTables(), RangeVarCallbackForAlterRelation(), RangeVarCallbackForDblink(), RangeVarCallbackForDropRelation(), RangeVarCallbackForLockTable(), RangeVarCallbackForPolicy(), RangeVarCallbackForRenameRule(), RangeVarCallbackForRenameTrigger(), RangeVarCallbackForStats(), RangeVarCallbackMaintainsTable(), RangeVarCallbackOwnsRelation(), RangeVarGetAndCheckCreationNamespace(), renameatt_check(), TargetPrivilegesCheck(), transformTableLikeClause(), and truncate_check_perms().
|
static |
Definition at line 5016 of file objectaddress.c.
References AccessShareLock, appendStringInfoString(), elog, ERROR, fb(), Form_pg_constraint, get_catalog_object_by_oid(), GETSTRUCT(), HeapTupleIsValid, OidIsValid, table_close(), and table_open().
Referenced by getObjectTypeDescription().
| char * getObjectDescription | ( | const ObjectAddress * | object, |
| bool | missing_ok | ||
| ) |
Definition at line 3009 of file objectaddress.c.
References _, AccessShareLock, appendStringInfo(), appendStringInfoString(), Assert, attname, BTEqualStrategyNumber, ObjectAddress::classId, CollationIsVisible(), ConversionIsVisible(), StringInfoData::data, datname, elog, ERROR, fb(), Form_pg_am, Form_pg_amop, Form_pg_amproc, Form_pg_auth_members, Form_pg_cast, Form_pg_collation, Form_pg_constraint, Form_pg_conversion, Form_pg_default_acl, Form_pg_event_trigger, Form_pg_opclass, Form_pg_policy, Form_pg_propgraph_element, Form_pg_propgraph_element_label, Form_pg_propgraph_label, Form_pg_propgraph_label_property, Form_pg_propgraph_property, Form_pg_publication_rel, Form_pg_rewrite, Form_pg_statistic_ext, Form_pg_transform, Form_pg_trigger, Form_pg_ts_config, Form_pg_ts_dict, Form_pg_ts_parser, Form_pg_ts_template, Form_pg_user_mapping, format_operator(), format_operator_extended(), FORMAT_OPERATOR_INVALID_AS_NULL, FORMAT_PROC_INVALID_AS_NULL, format_procedure(), format_procedure_extended(), FORMAT_TYPE_ALLOW_INVALID, format_type_be(), format_type_extended(), FORMAT_TYPE_INVALID_AS_NULL, get_attname(), get_database_name(), get_extension_name(), get_language_name(), get_namespace_name(), get_propgraph_label_name(), get_propgraph_property_name(), get_publication_name(), get_subscription_name(), get_tablespace_name(), GetAttrDefaultColumnAddress(), GetForeignDataWrapperExtended(), GetForeignServer(), GetForeignServerExtended(), getObjectDescription(), getOpFamilyDescription(), getPublicationSchemaInfo(), getRelationDescription(), GETSTRUCT(), GetUserNameFromId(), HeapTupleIsValid, initStringInfo(), LargeObjectExists(), StringInfoData::len, NameStr, ObjectAddressSet, ObjectAddress::objectId, ObjectIdGetDatum(), ObjectAddress::objectSubId, OidIsValid, OpclassIsVisible(), pfree(), proname, quote_qualified_identifier(), ReleaseSysCache(), ScanKeyInit(), SearchSysCache1(), StatisticsObjIsVisible(), subname, SysCacheGetAttrNotNull(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), table_open(), TextDatumGetCString, TSConfigIsVisible(), TSDictionaryIsVisible(), TSParserIsVisible(), TSTemplateIsVisible(), typname, and username.
Referenced by AlterExtensionNamespace(), ATExecAlterColumnType(), changeDependenciesOn(), check_relation_privileges(), checkMembershipInCurrentExtension(), checkSharedDependencies(), DefineView(), ExecAlterExtensionContentsRecurse(), findDependentObjects(), get_altertable_subcmdinfo(), get_object_address_opf_member(), getObjectDescription(), getObjectDescriptionOids(), pg_describe_object(), ProcedureCreate(), recordDependencyOnCurrentExtension(), RememberAllDependentForRebuilding(), reportDependentObjects(), sepgsql_fmgr_hook(), shdepDropOwned(), shdepReassignOwned(), storeObjectDescription(), and transformCreateTableAsStmt().
Definition at line 4333 of file objectaddress.c.
References ObjectAddress::classId, getObjectDescription(), ObjectAddress::objectId, and ObjectAddress::objectSubId.
Referenced by AlterObjectNamespace_internal(), and AlterObjectRename_internal().
| char * getObjectIdentity | ( | const ObjectAddress * | object, |
| bool | missing_ok | ||
| ) |
Definition at line 5090 of file objectaddress.c.
References fb(), and getObjectIdentityParts().
Referenced by check_relation_privileges(), check_schema_perms(), pg_event_trigger_ddl_commands(), pg_identify_object(), sepgsql_attribute_drop(), sepgsql_attribute_post_create(), sepgsql_attribute_relabel(), sepgsql_attribute_setattr(), sepgsql_database_drop(), sepgsql_database_relabel(), sepgsql_database_setattr(), sepgsql_proc_drop(), sepgsql_proc_execute(), sepgsql_proc_post_create(), sepgsql_proc_relabel(), sepgsql_proc_setattr(), sepgsql_relation_drop(), sepgsql_relation_post_create(), sepgsql_relation_relabel(), sepgsql_relation_setattr(), sepgsql_relation_truncate(), sepgsql_schema_drop(), and sepgsql_schema_relabel().
| char * getObjectIdentityParts | ( | const ObjectAddress * | object, |
| List ** | objname, | ||
| List ** | objargs, | ||
| bool | missing_ok | ||
| ) |
Definition at line 5105 of file objectaddress.c.
References _, AccessShareLock, appendStringInfo(), appendStringInfoString(), Assert, BTEqualStrategyNumber, ObjectAddress::classId, StringInfoData::data, datname, elog, ERROR, fb(), Form_pg_am, Form_pg_amop, Form_pg_amproc, Form_pg_auth_members, Form_pg_cast, Form_pg_collation, Form_pg_constraint, Form_pg_conversion, Form_pg_default_acl, Form_pg_event_trigger, Form_pg_language, Form_pg_opclass, Form_pg_policy, Form_pg_propgraph_element, Form_pg_propgraph_label, Form_pg_propgraph_property, Form_pg_publication_rel, Form_pg_rewrite, Form_pg_statistic_ext, Form_pg_transform, Form_pg_trigger, Form_pg_ts_config, Form_pg_ts_dict, Form_pg_ts_parser, Form_pg_ts_template, Form_pg_user_mapping, format_operator_extended(), FORMAT_OPERATOR_FORCE_QUALIFY, FORMAT_OPERATOR_INVALID_AS_NULL, format_operator_parts(), FORMAT_PROC_FORCE_QUALIFY, FORMAT_PROC_INVALID_AS_NULL, format_procedure_extended(), format_procedure_parts(), format_type_be_qualified(), format_type_extended(), FORMAT_TYPE_FORCE_QUALIFY, FORMAT_TYPE_INVALID_AS_NULL, get_am_name(), get_attname(), get_catalog_object_by_oid(), get_database_name(), get_extension_name(), get_language_name(), get_namespace_name_or_temp(), get_publication_name(), get_subscription_name(), get_tablespace_name(), GetAttrDefaultColumnAddress(), GetForeignDataWrapperExtended(), GetForeignServer(), GetForeignServerExtended(), getObjectIdentityParts(), getOpFamilyIdentity(), getPublicationSchemaInfo(), getRelationIdentity(), GETSTRUCT(), GetUserNameFromId(), HeapTupleIsValid, initStringInfo(), lappend(), LargeObjectExists(), StringInfoData::len, list_make1, list_make2, list_make3, NameStr, NIL, ObjectAddress::objectId, ObjectIdGetDatum(), ObjectAddress::objectSubId, OidIsValid, pfree(), proname, psprintf(), pstrdup(), quote_identifier(), quote_qualified_identifier(), ReleaseSysCache(), ScanKeyInit(), SearchSysCache1(), subname, SysCacheGetAttrNotNull(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), table_open(), TextDatumGetCString, and username.
Referenced by EventTriggerSQLDropAddObject(), getObjectIdentity(), getObjectIdentityParts(), and pg_identify_object_as_address().
| char * getObjectTypeDescription | ( | const ObjectAddress * | object, |
| bool | missing_ok | ||
| ) |
Definition at line 4748 of file objectaddress.c.
References appendStringInfoString(), Assert, ObjectAddress::classId, StringInfoData::data, elog, ERROR, fb(), getConstraintTypeDescription(), getProcedureTypeDescription(), getRelationTypeDescription(), initStringInfo(), StringInfoData::len, ObjectAddress::objectId, and ObjectAddress::objectSubId.
Referenced by EventTriggerSQLDropAddObject(), pg_event_trigger_ddl_commands(), pg_identify_object(), pg_identify_object_as_address(), and sepgsql_object_relabel().
|
static |
Definition at line 4429 of file objectaddress.c.
References _, appendStringInfo(), elog, ERROR, fb(), Form_pg_am, Form_pg_opfamily, get_namespace_name(), GETSTRUCT(), HeapTupleIsValid, NameStr, ObjectIdGetDatum(), OpfamilyIsVisible(), quote_qualified_identifier(), ReleaseSysCache(), and SearchSysCache1().
Referenced by getObjectDescription().
|
static |
Definition at line 6386 of file objectaddress.c.
References appendStringInfo(), elog, ERROR, fb(), Form_pg_am, Form_pg_opfamily, get_namespace_name_or_temp(), GETSTRUCT(), HeapTupleIsValid, list_make3, NameStr, ObjectIdGetDatum(), pstrdup(), quote_qualified_identifier(), ReleaseSysCache(), and SearchSysCache1().
Referenced by getObjectIdentityParts().
|
static |
Definition at line 5053 of file objectaddress.c.
References appendStringInfoString(), elog, ERROR, fb(), Form_pg_proc, GETSTRUCT(), HeapTupleIsValid, ObjectIdGetDatum(), ReleaseSysCache(), and SearchSysCache1().
Referenced by getObjectTypeDescription().
|
static |
Definition at line 2961 of file objectaddress.c.
References elog, ERROR, fb(), Form_pg_publication_namespace, get_namespace_name(), get_publication_name(), GETSTRUCT(), HeapTupleIsValid, ObjectAddress::objectId, ObjectIdGetDatum(), pfree(), ReleaseSysCache(), and SearchSysCache1().
Referenced by getObjectDescription(), and getObjectIdentityParts().
|
static |
Definition at line 4350 of file objectaddress.c.
References _, appendStringInfo(), elog, ERROR, fb(), get_namespace_name(), GETSTRUCT(), HeapTupleIsValid, NameStr, ObjectIdGetDatum(), quote_qualified_identifier(), RelationIsVisible(), ReleaseSysCache(), relname, and SearchSysCache1().
Referenced by getObjectDescription().
|
static |
Definition at line 6430 of file objectaddress.c.
References appendStringInfoString(), elog, ERROR, fb(), get_namespace_name_or_temp(), GETSTRUCT(), HeapTupleIsValid, list_make2, NameStr, NIL, ObjectIdGetDatum(), pstrdup(), quote_qualified_identifier(), ReleaseSysCache(), and SearchSysCache1().
Referenced by getObjectIdentityParts().
|
static |
Definition at line 4950 of file objectaddress.c.
References appendStringInfoString(), elog, ERROR, fb(), GETSTRUCT(), HeapTupleIsValid, ObjectIdGetDatum(), ReleaseSysCache(), and SearchSysCache1().
Referenced by getObjectTypeDescription().
Definition at line 2835 of file objectaddress.c.
References fb(), lengthof, and ObjectProperty.
Referenced by obtain_object_name_namespace(), pg_event_trigger_ddl_commands(), and pg_identify_object().
| Datum pg_describe_object | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4471 of file objectaddress.c.
References ObjectAddress::classId, cstring_to_text(), description, fb(), getObjectDescription(), ObjectAddress::objectId, ObjectAddress::objectSubId, OidIsValid, PG_GETARG_INT32, PG_GETARG_OID, PG_RETURN_NULL, and PG_RETURN_TEXT_P.
| Datum pg_get_acl | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4677 of file objectaddress.c.
References AccessShareLock, attnum, fb(), get_catalog_object_by_oid(), get_object_attnum_acl(), get_object_attnum_oid(), heap_getattr(), HeapTupleIsValid, InvalidAttrNumber, OidIsValid, PG_GETARG_INT32, PG_GETARG_OID, PG_RETURN_DATUM, PG_RETURN_NULL, RelationGetDescr, SearchSysCacheCopyAttNum(), SysCacheGetAttr(), table_close(), and table_open().
| Datum pg_get_object_address | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2204 of file objectaddress.c.
References AccessShareLock, ObjectAddress::classId, deconstruct_array_builtin(), elog, ereport, errcode(), errmsg, ERROR, fb(), get_call_result_type(), get_object_address(), heap_form_tuple(), HeapTupleGetDatum(), i, Int32GetDatum(), lappend(), lcons(), linitial, list_length(), list_make2, makeFloat(), makeNode, name, NIL, OBJECT_ACCESS_METHOD, OBJECT_AGGREGATE, OBJECT_AMOP, OBJECT_AMPROC, OBJECT_ATTRIBUTE, OBJECT_CAST, OBJECT_COLLATION, OBJECT_COLUMN, OBJECT_CONVERSION, OBJECT_DATABASE, OBJECT_DEFACL, OBJECT_DEFAULT, OBJECT_DOMAIN, OBJECT_DOMCONSTRAINT, OBJECT_EVENT_TRIGGER, OBJECT_EXTENSION, OBJECT_FDW, OBJECT_FOREIGN_SERVER, OBJECT_FOREIGN_TABLE, OBJECT_FUNCTION, OBJECT_INDEX, OBJECT_LANGUAGE, OBJECT_LARGEOBJECT, OBJECT_MATVIEW, OBJECT_OPCLASS, OBJECT_OPERATOR, OBJECT_OPFAMILY, OBJECT_PARAMETER_ACL, OBJECT_POLICY, OBJECT_PROCEDURE, OBJECT_PROPGRAPH, OBJECT_PUBLICATION, OBJECT_PUBLICATION_NAMESPACE, OBJECT_PUBLICATION_REL, OBJECT_ROLE, OBJECT_ROUTINE, OBJECT_RULE, OBJECT_SCHEMA, OBJECT_SEQUENCE, OBJECT_STATISTIC_EXT, OBJECT_SUBSCRIPTION, OBJECT_TABCONSTRAINT, OBJECT_TABLE, OBJECT_TABLESPACE, OBJECT_TRANSFORM, OBJECT_TRIGGER, OBJECT_TSCONFIGURATION, OBJECT_TSDICTIONARY, OBJECT_TSPARSER, OBJECT_TSTEMPLATE, OBJECT_TYPE, OBJECT_USER_MAPPING, OBJECT_VIEW, ObjectAddress::objectId, ObjectIdGetDatum(), ObjectAddress::objectSubId, pg_fallthrough, PG_GETARG_ARRAYTYPE_P, PG_GETARG_DATUM, PG_RETURN_DATUM, read_objtype_from_string(), relation_close(), textarray_to_strvaluelist(), TextDatumGetCString, type, TYPEFUNC_COMPOSITE, typeStringToTypeName(), and values.
| Datum pg_identify_object | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4499 of file objectaddress.c.
References AccessShareLock, ObjectAddress::classId, CStringGetTextDatum, DatumGetName(), DatumGetObjectId(), elog, ERROR, fb(), get_call_result_type(), get_catalog_object_by_oid(), get_namespace_name(), get_object_attnum_name(), get_object_attnum_namespace(), get_object_attnum_oid(), get_object_namensp_unique(), getObjectIdentity(), getObjectTypeDescription(), heap_form_tuple(), heap_getattr(), HeapTupleGetDatum(), InvalidAttrNumber, InvalidOid, is_objectclass_supported(), NameStr, ObjectAddress::objectId, ObjectAddress::objectSubId, OidIsValid, PG_GETARG_INT32, PG_GETARG_OID, PG_RETURN_DATUM, quote_identifier(), RelationGetDescr, table_close(), table_open(), TYPEFUNC_COMPOSITE, and values.
| Datum pg_identify_object_as_address | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4616 of file objectaddress.c.
References ObjectAddress::classId, construct_empty_array(), CStringGetTextDatum, elog, ERROR, fb(), get_call_result_type(), getObjectIdentityParts(), getObjectTypeDescription(), heap_form_tuple(), HeapTupleGetDatum(), NIL, ObjectAddress::objectId, ObjectAddress::objectSubId, pfree(), PG_GETARG_INT32, PG_GETARG_OID, PG_RETURN_DATUM, PointerGetDatum(), strlist_to_textarray(), TYPEFUNC_COMPOSITE, and values.
Definition at line 2706 of file objectaddress.c.
References ereport, errcode(), errmsg, ERROR, fb(), i, lengthof, and ObjectTypeMap.
Referenced by pg_get_object_address().
Definition at line 6464 of file objectaddress.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, construct_md_array(), CStringGetTextDatum, CurrentMemoryContext, fb(), j, lfirst, list_length(), MemoryContextDelete(), MemoryContextSwitchTo(), name, and palloc_array.
Referenced by fill_hba_line(), pg_event_trigger_dropped_objects(), and pg_identify_object_as_address().
Definition at line 2178 of file objectaddress.c.
References deconstruct_array_builtin(), ereport, errcode(), errmsg, ERROR, fb(), i, lappend(), makeString(), NIL, and TextDatumGetCString.
Referenced by pg_get_object_address().
| const ObjectAddress InvalidObjectAddress |
Definition at line 924 of file objectaddress.c.
Referenced by AlterDomainAddConstraint(), AlterDomainNotNull(), AlterDomainValidateConstraint(), AlterExtensionNamespace(), AlterPropGraph(), AlterPublicationOptions(), AlterSequence(), AlterStatistics(), AlterTableNamespace(), ATAddCheckNNConstraint(), ATExecAddColumn(), ATExecAddConstraint(), ATExecAlterColumnGenericOptions(), ATExecAlterConstraint(), ATExecCmd(), ATExecDropColumn(), ATExecDropExpression(), ATExecDropIdentity(), ATExecDropNotNull(), ATExecSetIdentity(), ATExecSetNotNull(), ATExecValidateConstraint(), CommentObject(), CreateExtension(), CreateForeignServer(), CreateOpFamily(), CreateSchemaCommand(), CreateStatistics(), CreateUserMapping(), DefineCollation(), DefineSequence(), ExecAlterExtensionStmt(), ExecAlterObjectSchemaStmt(), ExecAlterOwnerStmt(), ExecCreateTableAs(), ExecRenameStmt(), GetAttrDefaultColumnAddress(), ProcessUtilitySlow(), publication_add_relation(), publication_add_schema(), PublicationAddSchemas(), PublicationAddTables(), reindex_index(), ReindexRelationConcurrently(), renameatt(), RenameConstraint(), and RenameRelation().
|
static |
Definition at line 124 of file objectaddress.c.
Referenced by get_object_property_data(), and is_objectclass_supported().
|
static |
Referenced by read_objtype_from_string().