PostgreSQL Source Code git master
|
Go to the source code of this file.
Data Structures | |
struct | _FuncCandidateList |
struct | SearchPathMatcher |
Macros | |
#define | RangeVarGetRelid(relation, lockmode, missing_ok) |
Typedefs | |
typedef struct _FuncCandidateList * | FuncCandidateList |
typedef enum TempNamespaceStatus | TempNamespaceStatus |
typedef struct SearchPathMatcher | SearchPathMatcher |
typedef enum RVROption | RVROption |
typedef void(* | RangeVarGetRelidCallback) (const RangeVar *relation, Oid relId, Oid oldRelId, void *callback_arg) |
Enumerations | |
enum | TempNamespaceStatus { TEMP_NAMESPACE_NOT_TEMP , TEMP_NAMESPACE_IDLE , TEMP_NAMESPACE_IN_USE } |
enum | RVROption { RVR_MISSING_OK = 1 << 0 , RVR_NOWAIT = 1 << 1 , RVR_SKIP_LOCKED = 1 << 2 } |
Variables | |
PGDLLIMPORT char * | namespace_search_path |
#define RangeVarGetRelid | ( | relation, | |
lockmode, | |||
missing_ok | |||
) |
Definition at line 80 of file namespace.h.
typedef struct _FuncCandidateList * FuncCandidateList |
typedef void(* RangeVarGetRelidCallback) (const RangeVar *relation, Oid relId, Oid oldRelId, void *callback_arg) |
Definition at line 77 of file namespace.h.
typedef struct SearchPathMatcher SearchPathMatcher |
typedef enum TempNamespaceStatus TempNamespaceStatus |
enum RVROption |
Enumerator | |
---|---|
RVR_MISSING_OK | |
RVR_NOWAIT | |
RVR_SKIP_LOCKED |
Definition at line 70 of file namespace.h.
enum TempNamespaceStatus |
Enumerator | |
---|---|
TEMP_NAMESPACE_NOT_TEMP | |
TEMP_NAMESPACE_IDLE | |
TEMP_NAMESPACE_IN_USE |
Definition at line 45 of file namespace.h.
void AtEOSubXact_Namespace | ( | bool | isCommit, |
SubTransactionId | mySubid, | ||
SubTransactionId | parentSubid | ||
) |
Definition at line 4558 of file namespace.c.
References baseSearchPathValid, InvalidOid, InvalidSubTransactionId, MyProc, myTempNamespace, myTempNamespaceSubID, myTempToastNamespace, searchPathCacheValid, and PGPROC::tempNamespaceId.
Referenced by AbortSubTransaction(), and CommitSubTransaction().
void AtEOXact_Namespace | ( | bool | isCommit, |
bool | parallel | ||
) |
Definition at line 4512 of file namespace.c.
References baseSearchPathValid, before_shmem_exit(), InvalidOid, InvalidSubTransactionId, MyProc, myTempNamespace, myTempNamespaceSubID, myTempToastNamespace, RemoveTempRelationsCallback(), searchPathCacheValid, and PGPROC::tempNamespaceId.
Referenced by AbortTransaction(), CommitTransaction(), and PrepareTransaction().
Definition at line 3459 of file namespace.c.
References ereport, errcode(), errmsg(), ERROR, and isAnyTempNamespace().
Referenced by AlterObjectNamespace_internal(), AlterTableNamespace(), and AlterTypeNamespaceInternal().
TempNamespaceStatus checkTempNamespaceStatus | ( | Oid | namespaceId | ) |
Definition at line 3729 of file namespace.c.
References Assert, PGPROC::databaseId, GetTempNamespaceProcNumber(), INVALID_PROC_NUMBER, MyDatabaseId, OidIsValid, ProcNumberGetProc(), TEMP_NAMESPACE_IDLE, TEMP_NAMESPACE_IN_USE, TEMP_NAMESPACE_NOT_TEMP, and PGPROC::tempNamespaceId.
Referenced by do_autovacuum().
Oid CollationGetCollid | ( | const char * | collname | ) |
Definition at line 2373 of file namespace.c.
References activeSearchPath, collid, GetDatabaseEncoding(), InvalidOid, lfirst_oid, lookup_collation(), myTempNamespace, OidIsValid, and recomputeNamespacePath().
Referenced by CollationIsVisibleExt().
bool CollationIsVisible | ( | Oid | collid | ) |
Definition at line 2407 of file namespace.c.
References CollationIsVisibleExt(), and collid.
Referenced by generate_collation_name(), getObjectDescription(), and regcollationout().
Oid ConversionGetConid | ( | const char * | conname | ) |
Definition at line 2477 of file namespace.c.
References activeSearchPath, GetSysCacheOid2, InvalidOid, lfirst_oid, myTempNamespace, ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), and recomputeNamespacePath().
Referenced by ConversionIsVisibleExt().
bool ConversionIsVisible | ( | Oid | conid | ) |
Definition at line 2509 of file namespace.c.
References ConversionIsVisibleExt().
Referenced by getObjectDescription().
SearchPathMatcher * CopySearchPathMatcher | ( | SearchPathMatcher * | path | ) |
Definition at line 3889 of file namespace.c.
References SearchPathMatcher::addCatalog, SearchPathMatcher::addTemp, SearchPathMatcher::generation, list_copy(), palloc(), and SearchPathMatcher::schemas.
Referenced by CopyCachedPlan().
void DeconstructQualifiedName | ( | const List * | names, |
char ** | nspname_p, | ||
char ** | objname_p | ||
) |
Definition at line 3301 of file namespace.c.
References ereport, errcode(), errmsg(), ERROR, get_database_name(), linitial, list_length(), lsecond, lthird, MyDatabaseId, NameListToString(), and strVal.
Referenced by AlterStatistics(), FuncnameGetCandidates(), get_collation_oid(), get_conversion_oid(), get_statistics_object_oid(), get_ts_config_oid(), get_ts_dict_oid(), get_ts_parser_oid(), get_ts_template_oid(), LookupTypeNameExtended(), make_oper_cache_key(), OpClassCacheLookup(), OpernameGetCandidates(), OpernameGetOprid(), OpFamilyCacheLookup(), QualifiedNameGetCreationNamespace(), and ResolveOpClass().
List * fetch_search_path | ( | bool | includeImplicit | ) |
Definition at line 4819 of file namespace.c.
References AccessTempTableNamespace(), activeCreationNamespace, activeSearchPath, activeTempCreationPending, linitial_oid, list_copy(), list_delete_first(), and recomputeNamespacePath().
Referenced by AfterTriggerSetState(), CreateExtensionInternal(), current_schema(), current_schemas(), and ObjectsInPublicationToOids().
int fetch_search_path_array | ( | Oid * | sarray, |
int | sarray_len | ||
) |
Definition at line 4859 of file namespace.c.
References activeSearchPath, lfirst_oid, myTempNamespace, and recomputeNamespacePath().
Referenced by make_oper_cache_key().
Definition at line 4080 of file namespace.c.
References activeSearchPath, FindDefaultConversion(), InvalidOid, lfirst_oid, myTempNamespace, OidIsValid, and recomputeNamespacePath().
Referenced by BeginCopyFrom(), InitializeClientEncoding(), pg_do_encoding_conversion(), PrepareClientEncoding(), and test_enc_conversion().
FuncCandidateList FuncnameGetCandidates | ( | List * | names, |
int | nargs, | ||
List * | argnames, | ||
bool | expand_variadic, | ||
bool | expand_defaults, | ||
bool | include_out_arguments, | ||
bool | missing_ok | ||
) |
Definition at line 1192 of file namespace.c.
References activeSearchPath, _FuncCandidateList::argnumbers, generate_unaccent_rules::args, _FuncCandidateList::args, ARR_DATA_PTR, ARR_DIMS, ARR_ELEMTYPE, ARR_HASNULL, ARR_NDIM, Assert, CStringGetDatum(), DatumGetArrayTypeP, DeconstructQualifiedName(), elog, ERROR, funcname, GETSTRUCT, i, InvalidOid, j, lfirst_oid, LookupExplicitNamespace(), MatchNamedCall(), Max, catclist::members, myTempNamespace, catclist::n_members, _FuncCandidateList::nargs, _FuncCandidateList::ndargs, _FuncCandidateList::next, NIL, _FuncCandidateList::nominalnargs, _FuncCandidateList::nvargs, _FuncCandidateList::oid, OidIsValid, catclist::ordered, palloc(), _FuncCandidateList::pathpos, pfree(), pronargs, recomputeNamespacePath(), ReleaseSysCacheList, SearchSysCacheList1, SysCacheGetAttr(), and catctup::tuple.
Referenced by func_get_detail(), FunctionIsVisibleExt(), LookupFuncNameInternal(), regprocedurein(), regprocin(), and regprocout().
bool FunctionIsVisible | ( | Oid | funcid | ) |
Definition at line 1696 of file namespace.c.
References FunctionIsVisibleExt().
Referenced by format_procedure_extended().
Definition at line 3971 of file namespace.c.
References activeSearchPath, DeconstructQualifiedName(), ereport, errcode(), errmsg(), ERROR, GetDatabaseEncoding(), GetDatabaseEncodingName(), InvalidOid, lfirst_oid, lookup_collation(), LookupExplicitNamespace(), myTempNamespace, NameListToString(), OidIsValid, and recomputeNamespacePath().
Referenced by AlterCollation(), ComputeIndexAttrs(), ComputePartitionAttrs(), DefineCollation(), DefineDomain(), DefineRange(), get_object_address(), LookupCollation(), and regcollationin().
Definition at line 4025 of file namespace.c.
References activeSearchPath, DeconstructQualifiedName(), ereport, errcode(), errmsg(), ERROR, GetSysCacheOid2, InvalidOid, lfirst_oid, LookupExplicitNamespace(), myTempNamespace, NameListToString(), ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), and recomputeNamespacePath().
Referenced by get_object_address().
Oid get_namespace_oid | ( | const char * | nspname, |
bool | missing_ok | ||
) |
Definition at line 3535 of file namespace.c.
References CStringGetDatum(), ereport, errcode(), errmsg(), ERROR, GetSysCacheOid1, and OidIsValid.
Referenced by binary_upgrade_create_empty_extension(), convert_schema_name(), CreateExtensionInternal(), CreateSchemaCommand(), get_object_address_defacl(), get_object_address_publication_schema(), get_object_address_unqualified(), InitTempTableNamespace(), LookupCreationNamespace(), LookupExplicitNamespace(), LookupNamespaceNoError(), ObjectsInPublicationToOids(), preprocessNamespacePath(), QualifiedNameGetCreationNamespace(), RangeVarGetCreationNamespace(), regnamespacein(), ReindexMultipleTables(), RenameSchema(), and SetDefaultACLsInSchemas().
Definition at line 2575 of file namespace.c.
References activeSearchPath, DeconstructQualifiedName(), ereport, errcode(), errmsg(), ERROR, GetSysCacheOid2, InvalidOid, lfirst_oid, LookupExplicitNamespace(), myTempNamespace, NameListToString(), ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), and recomputeNamespacePath().
Referenced by AlterStatistics(), and get_object_address().
Definition at line 3152 of file namespace.c.
References activeSearchPath, DeconstructQualifiedName(), ereport, errcode(), errmsg(), ERROR, GetSysCacheOid2, InvalidOid, lfirst_oid, LookupExplicitNamespace(), myTempNamespace, NameListToString(), ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), and recomputeNamespacePath().
Referenced by check_default_text_search_config(), DefineTSConfiguration(), get_object_address(), GetTSConfigTuple(), getTSCurrentConfig(), regconfigin(), and tsvector_update_trigger().
Definition at line 2861 of file namespace.c.
References activeSearchPath, DeconstructQualifiedName(), ereport, errcode(), errmsg(), ERROR, GetSysCacheOid2, InvalidOid, lfirst_oid, LookupExplicitNamespace(), myTempNamespace, NameListToString(), ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), and recomputeNamespacePath().
Referenced by AlterTSDictionary(), get_object_address(), MakeConfigurationMapping(), regdictionaryin(), and thesaurus_init().
Definition at line 2716 of file namespace.c.
References activeSearchPath, DeconstructQualifiedName(), ereport, errcode(), errmsg(), ERROR, GetSysCacheOid2, InvalidOid, lfirst_oid, LookupExplicitNamespace(), myTempNamespace, NameListToString(), ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), and recomputeNamespacePath().
Referenced by DefineTSConfiguration(), get_object_address(), ts_parse_byname(), and ts_token_type_byname().
Definition at line 3007 of file namespace.c.
References activeSearchPath, DeconstructQualifiedName(), ereport, errcode(), errmsg(), ERROR, GetSysCacheOid2, InvalidOid, lfirst_oid, LookupExplicitNamespace(), myTempNamespace, NameListToString(), ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), and recomputeNamespacePath().
Referenced by DefineTSDictionary(), and get_object_address().
SearchPathMatcher * GetSearchPathMatcher | ( | MemoryContext | context | ) |
Definition at line 3852 of file namespace.c.
References activeCreationNamespace, activePathGeneration, activeSearchPath, SearchPathMatcher::addCatalog, SearchPathMatcher::addTemp, Assert, SearchPathMatcher::generation, linitial_oid, list_copy(), list_delete_first(), MemoryContextSwitchTo(), myTempNamespace, palloc0(), recomputeNamespacePath(), and SearchPathMatcher::schemas.
Referenced by CompleteCachedPlan(), and RevalidateCachedQuery().
ProcNumber GetTempNamespaceProcNumber | ( | Oid | namespaceId | ) |
Definition at line 3766 of file namespace.c.
References get_namespace_name(), INVALID_PROC_NUMBER, and pfree().
Referenced by checkTempNamespaceStatus(), pg_relation_filepath(), and RelationBuildDesc().
Definition at line 3805 of file namespace.c.
References myTempNamespace, and myTempToastNamespace.
Referenced by InitializeParallelDSM().
Oid GetTempToastNamespace | ( | void | ) |
Definition at line 3791 of file namespace.c.
References Assert, myTempToastNamespace, and OidIsValid.
Referenced by create_toast_table().
void InitializeSearchPath | ( | void | ) |
Definition at line 4736 of file namespace.c.
References activeCreationNamespace, activePathGeneration, activeSearchPath, activeTempCreationPending, baseCreationNamespace, baseSearchPath, baseSearchPathValid, baseTempCreationPending, CacheRegisterSyscacheCallback(), GetUserId(), InvalidationCallback(), IsBootstrapProcessingMode, list_make1_oid, MemoryContextSwitchTo(), namespaceUser, searchPathCacheValid, and TopMemoryContext.
Referenced by InitPostgres().
bool isAnyTempNamespace | ( | Oid | namespaceId | ) |
Definition at line 3687 of file namespace.c.
References get_namespace_name(), and pfree().
Referenced by AlterTableMoveAll(), check_publication_add_schema(), CheckSetNamespace(), EventTriggerSQLDropAddObject(), isOtherTempNamespace(), and RangeVarAdjustRelationPersistence().
bool isOtherTempNamespace | ( | Oid | namespaceId | ) |
Definition at line 3710 of file namespace.c.
References isAnyTempNamespace(), and isTempOrTempToastNamespace().
Referenced by pg_is_other_temp_schema().
bool isTempNamespace | ( | Oid | namespaceId | ) |
Definition at line 3649 of file namespace.c.
References myTempNamespace, and OidIsValid.
Referenced by CreateExtensionInternal(), EventTriggerSQLDropAddObject(), ExecCheckXactReadOnly(), get_namespace_name_or_temp(), pg_namespace_aclmask_ext(), ReindexMultipleTables(), and RemoveObjects().
bool isTempOrTempToastNamespace | ( | Oid | namespaceId | ) |
Definition at line 3673 of file namespace.c.
References myTempNamespace, myTempToastNamespace, and OidIsValid.
Referenced by create_toast_table(), isOtherTempNamespace(), pg_relation_filepath(), RangeVarAdjustRelationPersistence(), RelationBuildDesc(), and RelationBuildLocalRelation().
bool isTempToastNamespace | ( | Oid | namespaceId | ) |
Definition at line 3661 of file namespace.c.
References myTempToastNamespace, and OidIsValid.
Referenced by IsToastNamespace().
Oid LookupCreationNamespace | ( | const char * | nspname | ) |
Definition at line 3428 of file namespace.c.
References AccessTempTableNamespace(), ACL_CREATE, aclcheck_error(), ACLCHECK_OK, get_namespace_oid(), GetUserId(), myTempNamespace, object_aclcheck(), and OBJECT_SCHEMA.
Referenced by AlterExtensionNamespace(), AlterTypeNamespace(), ExecAlterObjectSchemaStmt(), ImportForeignSchema(), and make_new_heap().
Oid LookupExplicitNamespace | ( | const char * | nspname, |
bool | missing_ok | ||
) |
Definition at line 3385 of file namespace.c.
References ACL_USAGE, aclcheck_error(), ACLCHECK_OK, get_namespace_oid(), GetUserId(), InvalidOid, InvokeNamespaceSearchHook, myTempNamespace, object_aclcheck(), OBJECT_SCHEMA, and OidIsValid.
Referenced by AfterTriggerSetState(), FuncnameGetCandidates(), get_collation_oid(), get_conversion_oid(), get_statistics_object_oid(), get_ts_config_oid(), get_ts_dict_oid(), get_ts_parser_oid(), get_ts_template_oid(), LookupTypeNameExtended(), make_oper_cache_key(), objectsInSchemaToOids(), OpClassCacheLookup(), OpernameGetCandidates(), OpernameGetOprid(), OpFamilyCacheLookup(), RangeVarGetRelidExtended(), ResolveOpClass(), schema_to_xml(), schema_to_xml_and_xmlschema(), and schema_to_xmlschema_internal().
Oid LookupNamespaceNoError | ( | const char * | nspname | ) |
Definition at line 3355 of file namespace.c.
References get_namespace_oid(), InvalidOid, InvokeNamespaceSearchHook, myTempNamespace, and OidIsValid.
Referenced by DropErrorMsgNonExistent(), refnameNamespaceItem(), and schema_does_not_exist_skipping().
Definition at line 3554 of file namespace.c.
References RangeVar::catalogname, ereport, errcode(), errmsg(), ERROR, linitial, list_length(), lsecond, lthird, makeRangeVar(), NameListToString(), RangeVar::relname, RangeVar::schemaname, and strVal.
Referenced by bt_metap(), bt_multi_page_stats(), bt_page_items_internal(), bt_page_stats_internal(), convert_table_name(), currtid_byrelname(), generateSerialExtraStmts(), get_object_address_attrdef(), get_object_address_attribute(), get_object_address_publication_rel(), get_object_address_relobject(), get_raw_page_internal(), get_rel_from_relname(), get_relation_by_qualified_name(), nextval(), owningrel_does_not_exist_skipping(), pg_get_serial_sequence(), pg_get_viewdef_name(), pg_get_viewdef_name_ext(), pg_relpages(), pg_relpages_v1_5(), pgrowlocks(), pgstatindex(), pgstatindex_v1_5(), pgstattuple(), pgstattuple_v1_5(), plpgsql_parse_cwordrowtype(), plpgsql_parse_cwordtype(), process_owned_by(), regclassin(), RelationNameGetTupleDesc(), RemoveRelations(), row_security_active_name(), schema_does_not_exist_skipping(), and text_regclass().
char * NameListToQuotedString | ( | const List * | names | ) |
Definition at line 3628 of file namespace.c.
References appendStringInfoChar(), appendStringInfoString(), initStringInfo(), lfirst, list_head(), quote_identifier(), and strVal.
char * NameListToString | ( | const List * | names | ) |
Definition at line 3594 of file namespace.c.
References appendStringInfoChar(), appendStringInfoString(), elog, ERROR, initStringInfo(), IsA, lfirst, list_head(), name, nodeTag, and strVal.
Referenced by AggregateCreate(), AlterCollation(), AlterFunction(), AlterStatistics(), AlterTSConfiguration(), AlterTSDictionary(), check_object_ownership(), CreateConversionCommand(), CreateEventTrigger(), CreateProceduralLanguage(), CreateTransform(), CreateTriggerFiringOn(), DeconstructQualifiedName(), defGetString(), DefineOperator(), DefineType(), does_not_exist_skipping(), dropOperators(), dropProcedures(), ExpandColumnRefStar(), findRangeSubOpclass(), findTypeAnalyzeFunction(), findTypeInputFunction(), findTypeOutputFunction(), findTypeReceiveFunction(), findTypeSendFunction(), findTypeSubscriptingFunction(), findTypeTypmodinFunction(), findTypeTypmodoutFunction(), func_signature_string(), get_collation_oid(), get_conversion_oid(), get_object_address_attrdef(), get_object_address_attribute(), get_statistics_object_oid(), get_ts_config_oid(), get_ts_dict_oid(), get_ts_parser_oid(), get_ts_template_oid(), interpret_func_support(), lookup_fdw_handler_func(), LookupFuncName(), LookupFuncWithArgs(), LookupTypeNameExtended(), makeRangeVarFromNameList(), op_signature_string(), OpClassCacheLookup(), OperatorCreate(), OpFamilyCacheLookup(), owningrel_does_not_exist_skipping(), ParseFuncOrColumn(), plpgsql_post_column_ref(), regclassin(), regcollationin(), regconfigin(), regdictionaryin(), RemoveObjects(), ResolveOpClass(), storeOperators(), storeProcedures(), transformColumnRef(), transformRangeTableSample(), ValidateJoinEstimator(), ValidateOperatorReference(), and ValidateRestrictionEstimator().
bool OpclassIsVisible | ( | Oid | opcid | ) |
Definition at line 2154 of file namespace.c.
References OpclassIsVisibleExt().
Referenced by get_opclass_name(), and getObjectDescription().
Definition at line 2121 of file namespace.c.
References activeSearchPath, GetSysCacheOid3, InvalidOid, lfirst_oid, myTempNamespace, ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), and recomputeNamespacePath().
Referenced by OpClassCacheLookup(), OpclassIsVisibleExt(), and ResolveOpClass().
bool OperatorIsVisible | ( | Oid | oprid | ) |
Definition at line 2049 of file namespace.c.
References OperatorIsVisibleExt(), and oprid().
Referenced by format_operator_extended().
FuncCandidateList OpernameGetCandidates | ( | List * | names, |
char | oprkind, | ||
bool | missing_schema_ok | ||
) |
Definition at line 1888 of file namespace.c.
References activeSearchPath, _FuncCandidateList::argnumbers, _FuncCandidateList::args, Assert, CStringGetDatum(), DeconstructQualifiedName(), GETSTRUCT, i, InvalidOid, lfirst_oid, LookupExplicitNamespace(), catclist::members, myTempNamespace, catclist::n_members, _FuncCandidateList::nargs, _FuncCandidateList::ndargs, _FuncCandidateList::next, _FuncCandidateList::nominalnargs, _FuncCandidateList::nvargs, _FuncCandidateList::oid, OidIsValid, catclist::ordered, palloc(), _FuncCandidateList::pathpos, recomputeNamespacePath(), ReleaseSysCacheList, SearchSysCacheList1, SPACE_PER_OP, and catctup::tuple.
Referenced by left_oper(), oper(), regoperin(), and regoperout().
Definition at line 1785 of file namespace.c.
References activeSearchPath, CStringGetDatum(), DeconstructQualifiedName(), GETSTRUCT, HeapTupleIsValid, i, InvalidOid, lfirst_oid, LookupExplicitNamespace(), catclist::members, myTempNamespace, catclist::n_members, ObjectIdGetDatum(), OidIsValid, recomputeNamespacePath(), ReleaseSysCache(), ReleaseSysCacheList, SearchSysCache4(), SearchSysCacheList3, and catctup::tuple.
Referenced by binary_oper_exact(), left_oper(), LookupOperName(), OperatorIsVisibleExt(), and regoperatorin().
bool OpfamilyIsVisible | ( | Oid | opfid | ) |
Definition at line 2256 of file namespace.c.
References OpfamilyIsVisibleExt().
Referenced by getOpFamilyDescription().
Definition at line 2223 of file namespace.c.
References activeSearchPath, GetSysCacheOid3, InvalidOid, lfirst_oid, myTempNamespace, ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), and recomputeNamespacePath().
Referenced by OpFamilyCacheLookup(), and OpfamilyIsVisibleExt().
Definition at line 3487 of file namespace.c.
References AccessTempTableNamespace(), activeCreationNamespace, activeTempCreationPending, DeconstructQualifiedName(), ereport, errcode(), errmsg(), ERROR, get_namespace_oid(), myTempNamespace, OidIsValid, and recomputeNamespacePath().
Referenced by compute_return_type(), CreateConversionCommand(), CreateFunction(), CreateStatistics(), DefineAggregate(), DefineCollation(), DefineDomain(), DefineEnum(), DefineOpClass(), DefineOperator(), DefineOpFamily(), DefineRange(), DefineTSConfiguration(), DefineTSDictionary(), DefineTSParser(), DefineTSTemplate(), DefineType(), and get_other_operator().
Definition at line 846 of file namespace.c.
References ereport, errcode(), errmsg(), ERROR, isAnyTempNamespace(), isTempOrTempToastNamespace(), nspid, and RangeVar::relpersistence.
Referenced by DefineCompositeType(), generateSerialExtraStmts(), and RangeVarGetAndCheckCreationNamespace().
Oid RangeVarGetAndCheckCreationNamespace | ( | RangeVar * | relation, |
LOCKMODE | lockmode, | ||
Oid * | existing_relation_id | ||
) |
Definition at line 739 of file namespace.c.
References AccessShareLock, ACL_CREATE, aclcheck_error(), ACLCHECK_NOT_OWNER, ACLCHECK_OK, Assert, RangeVar::catalogname, ereport, errcode(), errmsg(), ERROR, get_database_name(), get_namespace_name(), get_rel_relkind(), get_relkind_objtype(), get_relname_relid(), GetUserId(), InvalidOid, IsBootstrapProcessingMode, LockDatabaseObject(), LockRelationOid(), MyDatabaseId, NoLock, nspid, object_aclcheck(), object_ownercheck(), OBJECT_SCHEMA, OidIsValid, RangeVarAdjustRelationPersistence(), RangeVarGetCreationNamespace(), RangeVar::relname, RangeVar::schemaname, SharedInvalidMessageCounter, UnlockDatabaseObject(), and UnlockRelationOid().
Referenced by AlterTableNamespace(), DefineCompositeType(), DefineRelation(), DefineSequence(), DefineVirtualRelation(), and transformCreateStmt().
Definition at line 654 of file namespace.c.
References AccessTempTableNamespace(), activeCreationNamespace, activeTempCreationPending, RangeVar::catalogname, ereport, errcode(), errmsg(), ERROR, get_database_name(), get_namespace_oid(), MyDatabaseId, myTempNamespace, OidIsValid, recomputeNamespacePath(), RangeVar::relname, RangeVar::relpersistence, and RangeVar::schemaname.
Referenced by CreateTableAsRelExists(), generateSerialExtraStmts(), and RangeVarGetAndCheckCreationNamespace().
Oid RangeVarGetRelidExtended | ( | const RangeVar * | relation, |
LOCKMODE | lockmode, | ||
uint32 | flags, | ||
RangeVarGetRelidCallback | callback, | ||
void * | callback_arg | ||
) |
Definition at line 441 of file namespace.c.
References AcceptInvalidationMessages(), Assert, callback(), RangeVar::catalogname, ConditionalLockRelationOid(), DEBUG1, ereport, errcode(), ERRCODE_UNDEFINED_TABLE, errmsg(), ERROR, get_database_name(), get_relname_relid(), InvalidOid, LockRelationOid(), LookupExplicitNamespace(), MyDatabaseId, myTempNamespace, NoLock, OidIsValid, RangeVar::relname, RelnameGetRelid(), RangeVar::relpersistence, RVR_MISSING_OK, RVR_NOWAIT, RVR_SKIP_LOCKED, RangeVar::schemaname, SharedInvalidMessageCounter, and UnlockRelationOid().
Referenced by AlterPolicy(), AlterSequence(), AlterTableLookupRelation(), AlterTableNamespace(), ATExecAttachPartitionIdx(), cluster(), CreatePolicy(), ExecRefreshMatView(), ExecuteTruncate(), expand_vacuum_rel(), LockTableCommand(), ProcessUtilitySlow(), ReindexIndex(), ReindexTable(), RemoveRelations(), rename_policy(), renameatt(), RenameConstraint(), RenameRelation(), RenameRewriteRule(), and renametrig().
bool RelationIsVisible | ( | Oid | relid | ) |
Definition at line 913 of file namespace.c.
References RelationIsVisibleExt().
Referenced by generate_relation_name(), getRelationDescription(), and regclassout().
Oid RelnameGetRelid | ( | const char * | relname | ) |
Definition at line 885 of file namespace.c.
References activeSearchPath, get_relname_relid(), InvalidOid, lfirst_oid, OidIsValid, recomputeNamespacePath(), and relname.
Referenced by plpgsql_parse_wordrowtype(), and RangeVarGetRelidExtended().
void ResetTempTableNamespace | ( | void | ) |
Definition at line 4644 of file namespace.c.
References myTempNamespace, OidIsValid, and RemoveTempRelations().
Referenced by DiscardAll(), and DiscardCommand().
bool SearchPathMatchesCurrentEnvironment | ( | SearchPathMatcher * | path | ) |
Definition at line 3911 of file namespace.c.
References activeCreationNamespace, activePathGeneration, activeSearchPath, SearchPathMatcher::addCatalog, SearchPathMatcher::addTemp, SearchPathMatcher::generation, InvalidOid, lfirst_oid, list_head(), lnext(), myTempNamespace, recomputeNamespacePath(), and SearchPathMatcher::schemas.
Referenced by CachedPlanAllowsSimpleValidityCheck(), CachedPlanIsSimplyValid(), and RevalidateCachedQuery().
Definition at line 3821 of file namespace.c.
References Assert, baseSearchPathValid, InvalidOid, InvalidSubTransactionId, myTempNamespace, myTempNamespaceSubID, myTempToastNamespace, and searchPathCacheValid.
Referenced by ParallelWorkerMain().
bool StatisticsObjIsVisible | ( | Oid | stxid | ) |
Definition at line 2632 of file namespace.c.
References StatisticsObjIsVisibleExt().
Referenced by getObjectDescription().
bool TSConfigIsVisible | ( | Oid | cfgid | ) |
Definition at line 3210 of file namespace.c.
References TSConfigIsVisibleExt().
Referenced by getObjectDescription(), and regconfigout().
bool TSDictionaryIsVisible | ( | Oid | dictId | ) |
Definition at line 2919 of file namespace.c.
References TSDictionaryIsVisibleExt().
Referenced by getObjectDescription(), and regdictionaryout().
bool TSParserIsVisible | ( | Oid | prsId | ) |
Definition at line 2774 of file namespace.c.
References TSParserIsVisibleExt().
Referenced by getObjectDescription().
bool TSTemplateIsVisible | ( | Oid | tmplId | ) |
Definition at line 3065 of file namespace.c.
References TSTemplateIsVisibleExt().
Referenced by getObjectDescription().
bool TypeIsVisible | ( | Oid | typid | ) |
Definition at line 1040 of file namespace.c.
References TypeIsVisibleExt().
Referenced by format_type_extended().
Oid TypenameGetTypid | ( | const char * | typname | ) |
Definition at line 995 of file namespace.c.
References TypenameGetTypidExtended(), and typname.
Oid TypenameGetTypidExtended | ( | const char * | typname, |
bool | temp_ok | ||
) |
Definition at line 1008 of file namespace.c.
References activeSearchPath, GetSysCacheOid2, InvalidOid, lfirst_oid, myTempNamespace, ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), recomputeNamespacePath(), and typname.
Referenced by LookupTypeNameExtended(), and TypenameGetTypid().
|
extern |
Definition at line 211 of file namespace.c.
Referenced by CreateSchemaCommand(), and recomputeNamespacePath().