|
PostgreSQL Source Code git master
|


Go to the source code of this file.
Data Structures | |
| struct | TypeCacheEntry |
| struct | DomainConstraintRef |
Macros | |
| #define | TYPECACHE_EQ_OPR 0x00001 |
| #define | TYPECACHE_LT_OPR 0x00002 |
| #define | TYPECACHE_GT_OPR 0x00004 |
| #define | TYPECACHE_CMP_PROC 0x00008 |
| #define | TYPECACHE_HASH_PROC 0x00010 |
| #define | TYPECACHE_EQ_OPR_FINFO 0x00020 |
| #define | TYPECACHE_CMP_PROC_FINFO 0x00040 |
| #define | TYPECACHE_HASH_PROC_FINFO 0x00080 |
| #define | TYPECACHE_TUPDESC 0x00100 |
| #define | TYPECACHE_BTREE_OPFAMILY 0x00200 |
| #define | TYPECACHE_HASH_OPFAMILY 0x00400 |
| #define | TYPECACHE_RANGE_INFO 0x00800 |
| #define | TYPECACHE_DOMAIN_BASE_INFO 0x01000 |
| #define | TYPECACHE_DOMAIN_CONSTR_INFO 0x02000 |
| #define | TYPECACHE_HASH_EXTENDED_PROC 0x04000 |
| #define | TYPECACHE_HASH_EXTENDED_PROC_FINFO 0x08000 |
| #define | TYPECACHE_MULTIRANGE_INFO 0x10000 |
| #define | INVALID_TUPLEDESC_IDENTIFIER ((uint64) 1) |
Typedefs | |
| typedef struct DomainConstraintCache | DomainConstraintCache |
| typedef struct TypeCacheEntry | TypeCacheEntry |
| typedef struct DomainConstraintRef | DomainConstraintRef |
| typedef struct SharedRecordTypmodRegistry | SharedRecordTypmodRegistry |
Definition at line 157 of file typcache.h.
| #define TYPECACHE_BTREE_OPFAMILY 0x00200 |
Definition at line 147 of file typcache.h.
| #define TYPECACHE_CMP_PROC 0x00008 |
Definition at line 141 of file typcache.h.
| #define TYPECACHE_CMP_PROC_FINFO 0x00040 |
Definition at line 144 of file typcache.h.
| #define TYPECACHE_DOMAIN_BASE_INFO 0x01000 |
Definition at line 150 of file typcache.h.
| #define TYPECACHE_DOMAIN_CONSTR_INFO 0x02000 |
Definition at line 151 of file typcache.h.
| #define TYPECACHE_EQ_OPR 0x00001 |
Definition at line 138 of file typcache.h.
| #define TYPECACHE_EQ_OPR_FINFO 0x00020 |
Definition at line 143 of file typcache.h.
| #define TYPECACHE_GT_OPR 0x00004 |
Definition at line 140 of file typcache.h.
| #define TYPECACHE_HASH_EXTENDED_PROC 0x04000 |
Definition at line 152 of file typcache.h.
| #define TYPECACHE_HASH_EXTENDED_PROC_FINFO 0x08000 |
Definition at line 153 of file typcache.h.
| #define TYPECACHE_HASH_OPFAMILY 0x00400 |
Definition at line 148 of file typcache.h.
| #define TYPECACHE_HASH_PROC 0x00010 |
Definition at line 142 of file typcache.h.
| #define TYPECACHE_HASH_PROC_FINFO 0x00080 |
Definition at line 145 of file typcache.h.
| #define TYPECACHE_LT_OPR 0x00002 |
Definition at line 139 of file typcache.h.
| #define TYPECACHE_MULTIRANGE_INFO 0x10000 |
Definition at line 154 of file typcache.h.
| #define TYPECACHE_RANGE_INFO 0x00800 |
Definition at line 149 of file typcache.h.
| #define TYPECACHE_TUPDESC 0x00100 |
Definition at line 146 of file typcache.h.
Definition at line 26 of file typcache.h.
Definition at line 177 of file typcache.h.
| typedef struct TypeCacheEntry TypeCacheEntry |
Definition at line 2136 of file typcache.c.
References Assert, ereport, errcode(), errmsg(), ERROR, fb(), format_type_be(), RecordCacheArrayEntry::id, lookup_type_cache(), RecordCacheArray, RecordCacheArrayLen, TypeCacheEntry::tupDesc, TypeCacheEntry::tupDesc_identifier, tupledesc_id_counter, and TYPECACHE_TUPDESC.
Referenced by expanded_record_fetch_tupdesc(), make_expanded_record_from_tupdesc(), and make_expanded_record_from_typeid().
Definition at line 2044 of file typcache.c.
References Assert, CacheMemoryContext, CreateCacheMemoryContext(), CreateTupleDescCopy(), ctl, ensure_record_cache_typmod_slot_exists(), fb(), find_or_make_matching_shared_tupledesc(), HASH_COMPARE, hash_create(), HASH_ELEM, HASH_ENTER, HASH_FIND, HASH_FUNCTION, hash_search(), RecordCacheArrayEntry::id, HASHCTL::keysize, MemoryContextSwitchTo(), NextRecordTypmod, record_type_typmod_compare(), record_type_typmod_hash(), RecordCacheArray, RecordCacheHash, TupleDescData::tdtypeid, TupleDescData::tdtypmod, RecordCacheArrayEntry::tupdesc, and tupledesc_id_counter.
Referenced by BlessTupleDesc(), ER_get_flat_size(), internal_get_result_type(), and SPI_returntuple().
Definition at line 3200 of file typcache.c.
References finalize_in_progress_typentries().
Referenced by AbortSubTransaction(), and CommitSubTransaction().
Definition at line 3194 of file typcache.c.
References finalize_in_progress_typentries().
Referenced by AbortTransaction(), CommitTransaction(), and PrepareTransaction().
|
extern |
Definition at line 2666 of file typcache.c.
References elog, enum_known_sorted(), TypeCacheEntry::enumData, ERROR, fb(), find_enumitem(), format_type_be(), load_enum_cache_data(), and TypeCacheEntry::type_id.
Referenced by enum_cmp_internal().
Definition at line 1491 of file typcache.c.
References TypeCacheEntry::domainData, fb(), lookup_type_cache(), and TYPECACHE_DOMAIN_CONSTR_INFO.
Referenced by ATColumnChangeRequiresRewrite(), ATExecAddColumn(), eval_const_expressions_mutator(), ExecInitJsonCoercion(), and transformJsonFuncExpr().
|
extern |
Definition at line 1404 of file typcache.c.
References dccref_deletion_callback(), fb(), lookup_type_cache(), MemoryContextRegisterResetCallback(), NIL, prep_domain_constraints(), and TYPECACHE_DOMAIN_CONSTR_INFO.
Referenced by domain_state_setup(), and ExecInitCoerceToDomain().
Definition at line 1924 of file typcache.c.
References lookup_rowtype_tupdesc_internal(), and PinTupleDesc.
Referenced by ATExecAddOf(), coerce_record_to_complex(), composite_to_json(), composite_to_jsonb(), deconstruct_composite_datum(), exec_move_row_from_datum(), ExecInitExprRec(), ExecuteCallStmt(), expanded_record_fetch_tupdesc(), get_cached_rowtype(), get_rule_expr(), GetAttributeByName(), GetAttributeByNum(), hash_record(), hash_record_extended(), HeapTupleHeaderGetDatum(), make_expanded_record_from_typeid(), make_tuple_indirect(), plperl_hash_from_datum(), pltcl_func_handler(), PLyDict_FromComposite(), PLyObject_ToComposite(), record_cmp(), record_eq(), record_image_cmp(), record_image_eq(), record_in(), record_out(), record_recv(), record_send(), transformOfType(), and update_cached_tupdesc().
Definition at line 1958 of file typcache.c.
References CreateTupleDescCopyConstr(), and lookup_rowtype_tupdesc_internal().
Referenced by ExecInitExprRec(), ExecMakeTableFunctionResult(), get_expr_result_type(), internal_get_result_type(), and TypeGetTupleDesc().
Definition at line 1980 of file typcache.c.
References TypeCacheEntry::domainBaseType, TypeCacheEntry::domainBaseTypmod, ereport, errcode(), errmsg(), ERROR, fb(), format_type_be(), lookup_rowtype_tupdesc_internal(), lookup_rowtype_tupdesc_noerror(), lookup_type_cache(), PinTupleDesc, TypeCacheEntry::tupDesc, TYPECACHE_DOMAIN_BASE_INFO, TYPECACHE_TUPDESC, and TypeCacheEntry::typtype.
Referenced by ExecEvalWholeRowVar(), hstore_from_record(), hstore_populate_record(), plperl_sv_to_datum(), and rowtype_field_matches().
Definition at line 1941 of file typcache.c.
References fb(), lookup_rowtype_tupdesc_internal(), and PinTupleDesc.
Referenced by lookup_rowtype_tupdesc_domain().
|
extern |
Definition at line 389 of file typcache.c.
References array_element_has_compare(), array_element_has_equality(), array_element_has_extended_hashing(), array_element_has_hashing(), Assert, BTEqualStrategyNumber, BTGreaterStrategyNumber, BTLessStrategyNumber, BTORDER_PROC, TypeCacheEntry::btree_opf, TypeCacheEntry::btree_opintype, CacheMemoryContext, CacheRegisterRelcacheCallback(), CacheRegisterSyscacheCallback(), TypeCacheEntry::cmp_proc, TypeCacheEntry::cmp_proc_finfo, CreateCacheMemoryContext(), ctl, TypeCacheEntry::domainBaseType, TypeCacheEntry::domainBaseTypmod, TypeCacheEntry::eq_opr, TypeCacheEntry::eq_opr_finfo, ereport, errcode(), errmsg(), ERROR, fb(), firstDomainTypeEntry, TypeCacheEntry::flags, fmgr_info_cxt(), FmgrInfo::fn_oid, get_hash_value(), get_opclass_family(), get_opclass_input_type(), get_opcode(), get_opfamily_member(), get_opfamily_proc(), getBaseTypeAndTypmod(), GetDefaultOpClass(), GETSTRUCT(), TypeCacheEntry::gt_opr, HASH_BLOBS, hash_create(), HASH_ELEM, HASH_ENTER, TypeCacheEntry::hash_extended_proc, TypeCacheEntry::hash_extended_proc_finfo, HASH_FIND, HASH_FUNCTION, TypeCacheEntry::hash_opf, TypeCacheEntry::hash_opintype, TypeCacheEntry::hash_proc, TypeCacheEntry::hash_proc_finfo, hash_search(), HASHEXTENDED_PROC, HASHSTANDARD_PROC, HeapTupleIsValid, HTEqualStrategyNumber, in_progress_list, in_progress_list_len, in_progress_list_maxlen, INJECTION_POINT, insert_rel_type_cache_if_needed(), InvalidOid, HASHCTL::keysize, load_domaintype_info(), load_multirangetype_info(), load_rangetype_info(), load_typcache_tupdesc(), lookup_type_cache(), TypeCacheEntry::lt_opr, MemoryContextAlloc(), MemSet, multirange_element_has_extended_hashing(), multirange_element_has_hashing(), NameStr, TypeCacheEntry::nextDomain, ObjectIdGetDatum(), OidIsValid, range_element_has_extended_hashing(), range_element_has_hashing(), record_fields_have_compare(), record_fields_have_equality(), record_fields_have_extended_hashing(), record_fields_have_hashing(), ReleaseSysCache(), RelIdToTypeIdCacheHash, repalloc(), TypeCacheEntry::rngelemtype, TypeCacheEntry::rngtype, SearchSysCache1(), TCFLAGS_CHECKED_BTREE_OPCLASS, TCFLAGS_CHECKED_CMP_PROC, TCFLAGS_CHECKED_DOMAIN_CONSTRAINTS, TCFLAGS_CHECKED_EQ_OPR, TCFLAGS_CHECKED_GT_OPR, TCFLAGS_CHECKED_HASH_EXTENDED_PROC, TCFLAGS_CHECKED_HASH_OPCLASS, TCFLAGS_CHECKED_HASH_PROC, TCFLAGS_CHECKED_LT_OPR, TCFLAGS_HAVE_PG_TYPE_DATA, TypeCacheEntry::tupDesc, TypeCacheEntry::typalign, TypeCacheEntry::typarray, TypeCacheEntry::typbyval, TypeCacheEntry::typcollation, type_cache_syshash(), TypeCacheEntry::type_id, TypeCacheEntry::type_id_hash, TYPECACHE_BTREE_OPFAMILY, TYPECACHE_CMP_PROC, TYPECACHE_CMP_PROC_FINFO, TYPECACHE_DOMAIN_BASE_INFO, TYPECACHE_DOMAIN_CONSTR_INFO, TYPECACHE_EQ_OPR, TYPECACHE_EQ_OPR_FINFO, TYPECACHE_GT_OPR, TYPECACHE_HASH_EXTENDED_PROC, TYPECACHE_HASH_EXTENDED_PROC_FINFO, TYPECACHE_HASH_OPFAMILY, TYPECACHE_HASH_PROC, TYPECACHE_HASH_PROC_FINFO, TYPECACHE_LT_OPR, TYPECACHE_MULTIRANGE_INFO, TYPECACHE_RANGE_INFO, TYPECACHE_TUPDESC, TypeCacheConstrCallback(), TypeCacheHash, TypeCacheOpcCallback(), TypeCacheRelCallback(), TypeCacheTypCallback(), TypeCacheEntry::typelem, TypeCacheEntry::typlen, TypeCacheEntry::typrelid, TypeCacheEntry::typstorage, TypeCacheEntry::typsubscript, and TypeCacheEntry::typtype.
Referenced by analyzeCTE(), appendOrderBySuffix(), array_cmp(), array_contain_compare(), array_eq(), array_position_common(), array_positions(), array_replace_internal(), array_reverse(), array_sample(), array_shuffle(), array_sort_internal(), array_typanalyze(), assign_record_type_identifier(), brin_bloom_opcinfo(), brin_inclusion_opcinfo(), brin_minmax_multi_opcinfo(), brin_minmax_opcinfo(), build_datatype(), build_mss(), cache_array_element_properties(), cache_multirange_element_properties(), cache_range_element_properties(), cache_record_field_properties(), calc_arraycontsel(), check_exclusion_or_unique_constraint(), check_memoizable(), contain_leaked_vars_walker(), create_grouping_expr_infos(), CreateStatistics(), dependency_degree(), domain_state_setup(), DomainHasConstraints(), enum_cmp_internal(), ExecInitExprRec(), find_simplified_clause(), foreign_expr_walker(), get_cached_rowtype(), get_multirange_io_data(), get_range_io_data(), get_rule_orderby(), get_sort_group_operators(), GinBufferInit(), hash_array(), hash_array_extended(), hash_multirange(), hash_multirange_extended(), hash_range(), hash_range_extended(), hash_record(), hash_record_extended(), init_grouping_targets(), InitDomainConstraintRef(), initGinState(), IsIndexUsableForReplicaIdentityFull(), load_multirangetype_info(), load_rangetype_info(), lookup_rowtype_tupdesc_domain(), lookup_rowtype_tupdesc_internal(), lookup_type_cache(), make_expanded_record_from_tupdesc(), make_expanded_record_from_typeid(), multirange_get_typcache(), multirange_minus_multi(), multirange_unnest(), ndistinct_for_combination(), op_hashjoinable(), op_mergejoinable(), paraminfo_get_equal_hashops(), PLy_input_setup_func(), PLy_output_setup_func(), range_fast_cmp(), range_get_typcache(), range_minus_multi(), record_cmp(), record_eq(), revalidate_rectypeid(), scalararraysel(), scalararraysel_containment(), show_sortorder_options(), statatt_get_elem_type(), statatt_get_type(), statext_mcv_serialize(), tuples_equal(), tuplesort_begin_index_gin(), and width_bucket_array().
|
extern |
Definition at line 2298 of file typcache.c.
References Session::area, Assert, CurrentSession, dshash_attach(), fb(), IsParallelWorker, MemoryContextSwitchTo(), NextRecordTypmod, on_dsm_detach(), PointerGetDatum(), Session::segment, Session::shared_record_table, shared_record_typmod_registry_detach(), Session::shared_typmod_registry, Session::shared_typmod_table, srtr_record_table_params, srtr_typmod_table_params, and TopMemoryContext.
Referenced by AttachSession().
Definition at line 2177 of file typcache.c.
Referenced by GetSessionDsmHandle().
|
extern |
Definition at line 2199 of file typcache.c.
References Assert, CurrentSession, dshash_create(), dshash_find_or_insert(), dshash_get_hash_table_handle(), dshash_release_lock(), elog, ERROR, fb(), IsParallelWorker, MemoryContextSwitchTo(), NextRecordTypmod, on_dsm_detach(), pg_atomic_init_u32(), RecordCacheArray, share_tupledesc(), Session::shared_record_table, shared_record_typmod_registry_detach(), Session::shared_typmod_registry, Session::shared_typmod_table, srtr_record_table_params, srtr_typmod_table_params, TupleDescData::tdtypmod, TopMemoryContext, and RecordCacheArrayEntry::tupdesc.
Referenced by GetSessionDsmHandle().
|
extern |
Definition at line 1442 of file typcache.c.
References DomainConstraintCache::constraints, DomainConstraintCache::dccRefCount, decr_dcc_refcount(), TypeCacheEntry::domainData, fb(), TypeCacheEntry::flags, load_domaintype_info(), NIL, prep_domain_constraints(), TCFLAGS_CHECKED_DOMAIN_CONSTRAINTS, and TypeCacheEntry::typtype.
Referenced by domain_check_input().