68#include "utils/fmgroids.h"
99#define TCFLAGS_HAVE_PG_TYPE_DATA 0x000001
100#define TCFLAGS_CHECKED_BTREE_OPCLASS 0x000002
101#define TCFLAGS_CHECKED_HASH_OPCLASS 0x000004
102#define TCFLAGS_CHECKED_EQ_OPR 0x000008
103#define TCFLAGS_CHECKED_LT_OPR 0x000010
104#define TCFLAGS_CHECKED_GT_OPR 0x000020
105#define TCFLAGS_CHECKED_CMP_PROC 0x000040
106#define TCFLAGS_CHECKED_HASH_PROC 0x000080
107#define TCFLAGS_CHECKED_HASH_EXTENDED_PROC 0x000100
108#define TCFLAGS_CHECKED_ELEM_PROPERTIES 0x000200
109#define TCFLAGS_HAVE_ELEM_EQUALITY 0x000400
110#define TCFLAGS_HAVE_ELEM_COMPARE 0x000800
111#define TCFLAGS_HAVE_ELEM_HASHING 0x001000
112#define TCFLAGS_HAVE_ELEM_EXTENDED_HASHING 0x002000
113#define TCFLAGS_CHECKED_FIELD_PROPERTIES 0x004000
114#define TCFLAGS_HAVE_FIELD_EQUALITY 0x008000
115#define TCFLAGS_HAVE_FIELD_COMPARE 0x010000
116#define TCFLAGS_HAVE_FIELD_HASHING 0x020000
117#define TCFLAGS_HAVE_FIELD_EXTENDED_HASHING 0x040000
118#define TCFLAGS_CHECKED_DOMAIN_CONSTRAINTS 0x080000
119#define TCFLAGS_DOMAIN_BASE_IS_COMPOSITE 0x100000
122#define TCFLAGS_OPERATOR_FLAGS \
123 (~(TCFLAGS_HAVE_PG_TYPE_DATA | \
124 TCFLAGS_CHECKED_DOMAIN_CONSTRAINTS | \
125 TCFLAGS_DOMAIN_BASE_IS_COMPOSITE))
319static int dcs_cmp(
const void *
a,
const void *
b);
345static int enum_oid_cmp(
const void *left,
const void *right);
390 int in_progress_offset;
398 ctl.keysize =
sizeof(
Oid);
413 ctl.keysize =
sizeof(
Oid);
457 if (typentry == NULL)
472 (
errcode(ERRCODE_UNDEFINED_OBJECT),
473 errmsg(
"type with OID %u does not exist", type_id)));
475 if (!typtup->typisdefined)
477 (
errcode(ERRCODE_UNDEFINED_OBJECT),
478 errmsg(
"type \"%s\" is only a shell",
494 typentry->
typlen = typtup->typlen;
495 typentry->
typbyval = typtup->typbyval;
496 typentry->
typalign = typtup->typalign;
498 typentry->
typtype = typtup->typtype;
499 typentry->
typrelid = typtup->typrelid;
501 typentry->
typelem = typtup->typelem;
502 typentry->
typarray = typtup->typarray;
507 if (typentry->
typtype == TYPTYPE_DOMAIN)
527 (
errcode(ERRCODE_UNDEFINED_OBJECT),
528 errmsg(
"type with OID %u does not exist", type_id)));
530 if (!typtup->typisdefined)
532 (
errcode(ERRCODE_UNDEFINED_OBJECT),
533 errmsg(
"type \"%s\" is only a shell",
540 typentry->
typlen = typtup->typlen;
541 typentry->
typbyval = typtup->typbyval;
542 typentry->
typalign = typtup->typalign;
544 typentry->
typtype = typtup->typtype;
545 typentry->
typrelid = typtup->typrelid;
547 typentry->
typelem = typtup->typelem;
548 typentry->
typarray = typtup->typarray;
657 if (eq_opr == ARRAY_EQ_OP &&
660 else if (eq_opr == RECORD_EQ_OP &&
665 if (typentry->
eq_opr != eq_opr)
668 typentry->
eq_opr = eq_opr;
694 if (lt_opr == ARRAY_LT_OP &&
697 else if (lt_opr == RECORD_LT_OP &&
701 typentry->
lt_opr = lt_opr;
719 if (gt_opr == ARRAY_GT_OP &&
722 else if (gt_opr == RECORD_GT_OP &&
726 typentry->
gt_opr = gt_opr;
744 if (cmp_proc == F_BTARRAYCMP &&
747 else if (cmp_proc == F_BTRECORDCMP &&
782 if (hash_proc == F_HASH_ARRAY &&
785 else if (hash_proc == F_HASH_RECORD &&
788 else if (hash_proc == F_HASH_RANGE &&
795 if (hash_proc == F_HASH_MULTIRANGE &&
831 if (hash_extended_proc == F_HASH_ARRAY_EXTENDED &&
834 else if (hash_extended_proc == F_HASH_RECORD_EXTENDED &&
837 else if (hash_extended_proc == F_HASH_RANGE_EXTENDED &&
844 if (hash_extended_proc == F_HASH_MULTIRANGE_EXTENDED &&
907 typentry->
typtype == TYPTYPE_COMPOSITE)
919 typentry->
typtype == TYPTYPE_RANGE)
932 typentry->
typtype == TYPTYPE_MULTIRANGE)
942 typentry->
typtype == TYPTYPE_DOMAIN)
950 typentry->
typtype == TYPTYPE_DOMAIN)
974 elog(
ERROR,
"invalid typrelid for composite type %u",
1019 elog(
ERROR,
"cache lookup failed for range type %u",
1023 subtypeOid = pg_range->rngsubtype;
1025 opclassOid = pg_range->rngsubopc;
1026 canonicalOid = pg_range->rngcanonical;
1027 subdiffOid = pg_range->rngsubdiff;
1039 elog(
ERROR,
"missing support function %d(%u,%u) in opfamily %u",
1067 elog(
ERROR,
"cache lookup failed for multirange type %u",
1087 bool notNull =
false;
1131 elog(
ERROR,
"cache lookup failed for type %u", typeOid);
1134 if (typTup->typtype != TYPTYPE_DOMAIN)
1142 if (typTup->typnotnull)
1147 Anum_pg_constraint_contypid,
1164 if (
c->contype != CONSTRAINT_CHECK)
1169 conRel->
rd_att, &isNull);
1171 elog(
ERROR,
"domain \"%s\" constraint \"%s\" has NULL conbin",
1183 "Domain constraints",
1224 else if (nccons >= cconslen)
1230 ccons[nccons++] = r;
1255 typeOid = typTup->typbasetype;
1275 "Domain constraints",
1324 return strcmp((*ca)->name, (*cb)->name);
1372 foreach(lc, constraints)
1383 result =
lappend(result, newr);
1446 typentry->
typtype == TYPTYPE_DOMAIN)
1622 if (typentry->
type_id == RECORDOID)
1627 else if (typentry->
typtype == TYPTYPE_COMPOSITE)
1634 if (typentry->
tupDesc == NULL)
1646 for (
i = 0;
i < tupdesc->
natts;
i++)
1651 if (attr->attisdropped)
1660 newflags &= ~TCFLAGS_HAVE_FIELD_EQUALITY;
1662 newflags &= ~TCFLAGS_HAVE_FIELD_COMPARE;
1664 newflags &= ~TCFLAGS_HAVE_FIELD_HASHING;
1666 newflags &= ~TCFLAGS_HAVE_FIELD_EXTENDED_HASHING;
1672 typentry->
flags |= newflags;
1676 else if (typentry->
typtype == TYPTYPE_DOMAIN)
1694 if (baseentry->
typtype == TYPTYPE_COMPOSITE)
1735 typentry->
typtype == TYPTYPE_RANGE)
1774 if (typentry->
rngtype == NULL &&
1775 typentry->
typtype == TYPTYPE_MULTIRANGE)
1830 if (type_id != RECORDOID)
1838 if (typentry->
tupDesc == NULL && !noError)
1840 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1841 errmsg(
"type %s is not composite",
1900 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1901 errmsg(
"record type has not been registered")));
1944 if (tupDesc != NULL)
1982 if (type_id != RECORDOID)
1993 if (typentry->
typtype == TYPTYPE_DOMAIN)
1997 if (typentry->
tupDesc == NULL && !noError)
1999 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
2000 errmsg(
"type %s is not composite",
2006 if (tupDesc != NULL)
2077 if (found && recentry->
tupdesc != NULL)
2088 if (entDesc == NULL)
2136 if (type_id != RECORDOID)
2144 if (typentry->
tupDesc == NULL)
2146 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
2147 errmsg(
"type %s is not composite",
2242 if (tupdesc == NULL)
2253 elog(
ERROR,
"cannot create duplicate shared record typmod");
2259 record_table_key.
shared =
false;
2367 bool hadTupDescOrOpclass;
2372 hadTupDescOrOpclass = (typentry->
tupDesc != NULL) ||
2376 if (typentry->
tupDesc != NULL)
2396 typentry->
flags &= ~TCFLAGS_OPERATOR_FLAGS;
2399 if (hadTupDescOrOpclass)
2437 if (relentry != NULL)
2443 if (typentry != NULL)
2469 typentry->
flags &= ~TCFLAGS_OPERATOR_FLAGS;
2484 if (typentry->
typtype == TYPTYPE_COMPOSITE)
2488 else if (typentry->
typtype == TYPTYPE_DOMAIN)
2498 typentry->
flags &= ~TCFLAGS_OPERATOR_FLAGS;
2580 typentry->
flags &= ~TCFLAGS_OPERATOR_FLAGS;
2614 typentry->
flags &= ~TCFLAGS_CHECKED_DOMAIN_CONSTRAINTS;
2627 if (arg < enumdata->bitmap_base)
2630 if (offset > (
Oid) INT_MAX)
2688 if (item1 == NULL || item2 == NULL)
2706 elog(
ERROR,
"enum value %u not found in cache for enum %s",
2709 elog(
ERROR,
"enum value %u not found in cache for enum %s",
2742 if (tcache->
typtype != TYPTYPE_ENUM)
2744 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
2745 errmsg(
"%s is not an enum",
2761 Anum_pg_enum_enumtypid,
2767 EnumTypIdLabelIndexId,
2775 if (numitems >= maxitems)
2780 items[numitems].enum_oid = en->oid;
2781 items[numitems].sort_order = en->enumsortorder;
2807 for (start_pos = 0; start_pos < numitems - 1; start_pos++)
2813 int this_bm_size = 1;
2814 Oid start_oid =
items[start_pos].enum_oid;
2818 for (
i = start_pos + 1;
i < numitems;
i++)
2822 offset =
items[
i].enum_oid - start_oid;
2827 if (
items[
i].sort_order > prev_order)
2829 prev_order =
items[
i].sort_order;
2836 if (this_bm_size > bm_size)
2839 bitmap_base = start_oid;
2840 bitmap = this_bitmap;
2841 bm_size = this_bm_size;
2852 if (bm_size >= (numitems - start_pos - 1))
2947 key.u.local_tupdesc = tupdesc;
2950 if (record_table_entry)
2954 record_table_entry);
2981 elog(
ERROR,
"cannot create duplicate shared record typmod");
2989 typmod_table_entry->
typmod = typmod;
2992 typmod_table_entry);
3008 record_table_entry);
3030 record_table_entry);
3066 if (typentry->
typtype != TYPTYPE_COMPOSITE)
3099#ifdef USE_ASSERT_CHECKING
3101 bool is_in_progress =
false;
3107 is_in_progress =
true;
3114 if (typentry->
typtype != TYPTYPE_COMPOSITE)
3133 Assert(found || is_in_progress);
3137#ifdef USE_ASSERT_CHECKING
3144 if (!is_in_progress)
static void pg_atomic_init_u32(volatile pg_atomic_uint32 *ptr, uint32 val)
static uint32 pg_atomic_fetch_add_u32(volatile pg_atomic_uint32 *ptr, int32 add_)
Bitmapset * bms_make_singleton(int x)
void bms_free(Bitmapset *a)
bool bms_is_member(int x, const Bitmapset *a)
Bitmapset * bms_add_member(Bitmapset *a, int x)
Bitmapset * bms_copy(const Bitmapset *a)
#define TextDatumGetCString(d)
#define RegProcedureIsValid(p)
#define FLEXIBLE_ARRAY_MEMBER
#define MemSet(start, val, len)
#define OidIsValid(objectId)
void CreateCacheMemoryContext(void)
void * dsa_get_address(dsa_area *area, dsa_pointer dp)
void dsa_free(dsa_area *area, dsa_pointer dp)
#define dsa_allocate(area, size)
bool dshash_delete_key(dshash_table *hash_table, const void *key)
void dshash_memcpy(void *dest, const void *src, size_t size, void *arg)
void dshash_release_lock(dshash_table *hash_table, void *entry)
void dshash_detach(dshash_table *hash_table)
void * dshash_find(dshash_table *hash_table, const void *key, bool exclusive)
dshash_table_handle dshash_get_hash_table_handle(dshash_table *hash_table)
dshash_table * dshash_attach(dsa_area *area, const dshash_parameters *params, dshash_table_handle handle, void *arg)
void * dshash_find_or_insert(dshash_table *hash_table, const void *key, bool *found)
dshash_hash dshash_memhash(const void *v, size_t size, void *arg)
dshash_table * dshash_create(dsa_area *area, const dshash_parameters *params, void *arg)
int dshash_memcmp(const void *a, const void *b, size_t size, void *arg)
dsa_pointer dshash_table_handle
void on_dsm_detach(dsm_segment *seg, on_dsm_detach_callback function, Datum arg)
void hash_seq_init_with_hash_value(HASH_SEQ_STATUS *status, HTAB *hashp, uint32 hashvalue)
void * hash_search(HTAB *hashp, const void *keyPtr, HASHACTION action, bool *foundPtr)
void * hash_seq_search(HASH_SEQ_STATUS *status)
HTAB * hash_create(const char *tabname, long nelem, const HASHCTL *info, int flags)
uint32 get_hash_value(HTAB *hashp, const void *keyPtr)
void hash_seq_init(HASH_SEQ_STATUS *status, HTAB *hashp)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
ExprState * ExecInitExpr(Expr *node, PlanState *parent)
void fmgr_info_cxt(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt)
void systable_endscan(SysScanDesc sysscan)
HeapTuple systable_getnext(SysScanDesc sysscan)
SysScanDesc systable_beginscan(Relation heapRelation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, ScanKey key)
#define HASHSTANDARD_PROC
#define HASHEXTENDED_PROC
Assert(PointerIsAligned(start, uint64))
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
static Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
#define IsParallelWorker()
Oid GetDefaultOpClass(Oid type_id, Oid am_id)
#define INJECTION_POINT(name)
static int pg_cmp_u32(uint32 a, uint32 b)
void CacheRegisterRelcacheCallback(RelcacheCallbackFunction func, Datum arg)
void CacheRegisterSyscacheCallback(int cacheid, SyscacheCallbackFunction func, Datum arg)
List * lappend(List *list, void *datum)
List * lcons(void *datum, List *list)
Oid get_opclass_input_type(Oid opclass)
Oid get_opclass_family(Oid opclass)
Oid get_multirange_range(Oid multirangeOid)
Oid get_opfamily_proc(Oid opfamily, Oid lefttype, Oid righttype, int16 procnum)
RegProcedure get_opcode(Oid opno)
Oid get_opfamily_member(Oid opfamily, Oid lefttype, Oid righttype, int16 strategy)
Oid get_base_element_type(Oid typid)
Oid getBaseTypeAndTypmod(Oid typid, int32 *typmod)
@ LWTRANCHE_PER_SESSION_RECORD_TYPMOD
@ LWTRANCHE_PER_SESSION_RECORD_TYPE
void * MemoryContextAlloc(MemoryContext context, Size size)
void * MemoryContextAllocZero(MemoryContext context, Size size)
char * pstrdup(const char *in)
void MemoryContextRegisterResetCallback(MemoryContext context, MemoryContextCallback *cb)
void MemoryContextSetParent(MemoryContext context, MemoryContext new_parent)
void * repalloc(void *pointer, Size size)
void pfree(void *pointer)
MemoryContext TopMemoryContext
MemoryContext CurrentMemoryContext
MemoryContext CacheMemoryContext
void MemoryContextDelete(MemoryContext context)
#define AllocSetContextCreate
#define ALLOCSET_SMALL_SIZES
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
#define repalloc0_array(pointer, type, oldcount, count)
FormData_pg_attribute * Form_pg_attribute
static uint32 pg_nextpower2_32(uint32 num)
FormData_pg_constraint * Form_pg_constraint
FormData_pg_enum * Form_pg_enum
FormData_pg_range * Form_pg_range
FormData_pg_type * Form_pg_type
Expr * expression_planner(Expr *expr)
#define qsort(a, b, c, d)
static Datum PointerGetDatum(const void *X)
static Datum ObjectIdGetDatum(Oid X)
void * stringToNode(const char *str)
#define RelationGetDescr(relation)
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
void relation_close(Relation relation, LOCKMODE lockmode)
Relation relation_open(Oid relationId, LOCKMODE lockmode)
#define BTGreaterStrategyNumber
#define HTEqualStrategyNumber
#define BTLessStrategyNumber
#define BTEqualStrategyNumber
DomainConstraintCache * dcc
MemoryContextCallback callback
DomainConstraintType constrainttype
ExprState * check_exprstate
MemoryContextCallbackFunction func
dshash_table * shared_record_table
struct SharedRecordTypmodRegistry * shared_typmod_registry
dshash_table * shared_typmod_table
dsa_pointer shared_tupdesc
union SharedRecordTableKey::@31 u
dshash_table_handle typmod_table_handle
pg_atomic_uint32 next_typmod
dshash_table_handle record_table_handle
dsa_pointer shared_tupdesc
uint64 tupDesc_identifier
FmgrInfo rng_cmp_proc_finfo
struct TypeCacheEntry * rngelemtype
FmgrInfo hash_extended_proc_finfo
DomainConstraintCache * domainData
struct TypeCacheEntry * rngtype
FmgrInfo rng_subdiff_finfo
struct TypeCacheEnumData * enumData
struct TypeCacheEntry * nextDomain
FmgrInfo rng_canonical_finfo
Bitmapset * sorted_values
EnumItem enum_values[FLEXIBLE_ARRAY_MEMBER]
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
#define GetSysCacheHashValue1(cacheId, key1)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
TupleDesc CreateTupleDescCopyConstr(TupleDesc tupdesc)
void TupleDescCopy(TupleDesc dst, TupleDesc src)
void DecrTupleDescRefCount(TupleDesc tupdesc)
void FreeTupleDesc(TupleDesc tupdesc)
void IncrTupleDescRefCount(TupleDesc tupdesc)
uint32 hashRowType(TupleDesc desc)
TupleDesc CreateTupleDescCopy(TupleDesc tupdesc)
bool equalRowTypes(TupleDesc tupdesc1, TupleDesc tupdesc2)
#define TupleDescSize(src)
#define PinTupleDesc(tupdesc)
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)
struct TupleDescData * TupleDesc
#define TCFLAGS_CHECKED_BTREE_OPCLASS
#define TCFLAGS_CHECKED_HASH_OPCLASS
static bool range_element_has_hashing(TypeCacheEntry *typentry)
static void insert_rel_type_cache_if_needed(TypeCacheEntry *typentry)
void InitDomainConstraintRef(Oid type_id, DomainConstraintRef *ref, MemoryContext refctx, bool need_exprstate)
static TupleDesc lookup_rowtype_tupdesc_internal(Oid type_id, int32 typmod, bool noError)
TupleDesc lookup_rowtype_tupdesc(Oid type_id, int32 typmod)
void SharedRecordTypmodRegistryAttach(SharedRecordTypmodRegistry *registry)
#define TCFLAGS_OPERATOR_FLAGS
#define TCFLAGS_CHECKED_FIELD_PROPERTIES
static void cache_range_element_properties(TypeCacheEntry *typentry)
#define TCFLAGS_HAVE_FIELD_COMPARE
void AtEOXact_TypeCache(void)
#define TCFLAGS_DOMAIN_BASE_IS_COMPOSITE
static void load_enum_cache_data(TypeCacheEntry *tcache)
static bool record_fields_have_hashing(TypeCacheEntry *typentry)
static HTAB * RelIdToTypeIdCacheHash
static EnumItem * find_enumitem(TypeCacheEnumData *enumdata, Oid arg)
static bool record_fields_have_extended_hashing(TypeCacheEntry *typentry)
static TupleDesc find_or_make_matching_shared_tupledesc(TupleDesc tupdesc)
static int in_progress_list_maxlen
static int32 NextRecordTypmod
TupleDesc lookup_rowtype_tupdesc_domain(Oid type_id, int32 typmod, bool noError)
static Oid * in_progress_list
static const dshash_parameters srtr_typmod_table_params
static void delete_rel_type_cache_if_needed(TypeCacheEntry *typentry)
#define TCFLAGS_CHECKED_GT_OPR
static bool multirange_element_has_hashing(TypeCacheEntry *typentry)
static List * prep_domain_constraints(List *constraints, MemoryContext execctx)
TupleDesc lookup_rowtype_tupdesc_noerror(Oid type_id, int32 typmod, bool noError)
static bool record_fields_have_equality(TypeCacheEntry *typentry)
#define TCFLAGS_CHECKED_LT_OPR
#define TCFLAGS_CHECKED_HASH_PROC
static void dccref_deletion_callback(void *arg)
#define TCFLAGS_HAVE_FIELD_EQUALITY
static void InvalidateCompositeTypeCacheEntry(TypeCacheEntry *typentry)
struct SharedRecordTableEntry SharedRecordTableEntry
void SharedRecordTypmodRegistryInit(SharedRecordTypmodRegistry *registry, dsm_segment *segment, dsa_area *area)
static int dcs_cmp(const void *a, const void *b)
static bool array_element_has_extended_hashing(TypeCacheEntry *typentry)
static int shared_record_table_compare(const void *a, const void *b, size_t size, void *arg)
static bool array_element_has_hashing(TypeCacheEntry *typentry)
static void load_multirangetype_info(TypeCacheEntry *typentry)
static uint32 type_cache_syshash(const void *key, Size keysize)
#define TCFLAGS_CHECKED_CMP_PROC
struct SharedTypmodTableEntry SharedTypmodTableEntry
#define TCFLAGS_HAVE_ELEM_EXTENDED_HASHING
static bool multirange_element_has_extended_hashing(TypeCacheEntry *typentry)
static int in_progress_list_len
static bool array_element_has_equality(TypeCacheEntry *typentry)
static dsa_pointer share_tupledesc(dsa_area *area, TupleDesc tupdesc, uint32 typmod)
static void load_rangetype_info(TypeCacheEntry *typentry)
uint64 assign_record_type_identifier(Oid type_id, int32 typmod)
static RecordCacheArrayEntry * RecordCacheArray
static bool range_element_has_extended_hashing(TypeCacheEntry *typentry)
static HTAB * RecordCacheHash
static bool enum_known_sorted(TypeCacheEnumData *enumdata, Oid arg)
static TypeCacheEntry * firstDomainTypeEntry
struct RelIdToTypeIdCacheEntry RelIdToTypeIdCacheEntry
struct RecordCacheEntry RecordCacheEntry
void AtEOSubXact_TypeCache(void)
static void shared_record_typmod_registry_detach(dsm_segment *segment, Datum datum)
#define TCFLAGS_HAVE_ELEM_HASHING
struct RecordCacheArrayEntry RecordCacheArrayEntry
#define TCFLAGS_CHECKED_HASH_EXTENDED_PROC
static void TypeCacheTypCallback(Datum arg, int cacheid, uint32 hashvalue)
struct TypeCacheEnumData TypeCacheEnumData
static void TypeCacheConstrCallback(Datum arg, int cacheid, uint32 hashvalue)
static void TypeCacheOpcCallback(Datum arg, int cacheid, uint32 hashvalue)
static void load_domaintype_info(TypeCacheEntry *typentry)
bool DomainHasConstraints(Oid type_id)
#define TCFLAGS_HAVE_ELEM_COMPARE
static void TypeCacheRelCallback(Datum arg, Oid relid)
static void cache_array_element_properties(TypeCacheEntry *typentry)
size_t SharedRecordTypmodRegistryEstimate(void)
static void cache_multirange_element_properties(TypeCacheEntry *typentry)
#define TCFLAGS_CHECKED_ELEM_PROPERTIES
#define TCFLAGS_HAVE_ELEM_EQUALITY
static bool array_element_has_compare(TypeCacheEntry *typentry)
#define TCFLAGS_HAVE_PG_TYPE_DATA
static uint32 shared_record_table_hash(const void *a, size_t size, void *arg)
int compare_values_of_enum(TypeCacheEntry *tcache, Oid arg1, Oid arg2)
#define TCFLAGS_CHECKED_DOMAIN_CONSTRAINTS
#define TCFLAGS_HAVE_FIELD_EXTENDED_HASHING
struct SharedRecordTableKey SharedRecordTableKey
static int32 RecordCacheArrayLen
void assign_record_type_typmod(TupleDesc tupDesc)
static HTAB * TypeCacheHash
static uint64 tupledesc_id_counter
static bool record_fields_have_compare(TypeCacheEntry *typentry)
#define TCFLAGS_HAVE_FIELD_HASHING
static int record_type_typmod_compare(const void *a, const void *b, size_t size)
static const dshash_parameters srtr_record_table_params
TupleDesc lookup_rowtype_tupdesc_copy(Oid type_id, int32 typmod)
static int enum_oid_cmp(const void *left, const void *right)
static void finalize_in_progress_typentries(void)
static void decr_dcc_refcount(DomainConstraintCache *dcc)
#define TCFLAGS_CHECKED_EQ_OPR
void UpdateDomainConstraintRef(DomainConstraintRef *ref)
TypeCacheEntry * lookup_type_cache(Oid type_id, int flags)
static void ensure_record_cache_typmod_slot_exists(int32 typmod)
static void cache_record_field_properties(TypeCacheEntry *typentry)
static uint32 record_type_typmod_hash(const void *data, size_t size)
static void load_typcache_tupdesc(TypeCacheEntry *typentry)
#define INVALID_TUPLEDESC_IDENTIFIER
#define TYPECACHE_HASH_PROC_FINFO
#define TYPECACHE_HASH_OPFAMILY
#define TYPECACHE_TUPDESC
#define TYPECACHE_MULTIRANGE_INFO
struct SharedRecordTypmodRegistry SharedRecordTypmodRegistry
#define TYPECACHE_EQ_OPR_FINFO
#define TYPECACHE_HASH_EXTENDED_PROC
#define TYPECACHE_BTREE_OPFAMILY
#define TYPECACHE_DOMAIN_BASE_INFO
#define TYPECACHE_DOMAIN_CONSTR_INFO
#define TYPECACHE_RANGE_INFO
#define TYPECACHE_CMP_PROC
struct TypeCacheEntry TypeCacheEntry
#define TYPECACHE_HASH_EXTENDED_PROC_FINFO
#define TYPECACHE_CMP_PROC_FINFO
#define TYPECACHE_HASH_PROC