/* DomainConstraintCache is an opaque struct known only within typcache.c */ typedefstruct DomainConstraintCache DomainConstraintCache;
/* TypeCacheEnumData is an opaque struct known only within typcache.c */ struct TypeCacheEnumData;
typedefstruct TypeCacheEntry
{ /* typeId is the hash lookup key and MUST BE FIRST */
Oid type_id; /* OID of the data type */
uint32 type_id_hash; /* hashed value of the OID */
/* some subsidiary information copied from the pg_type row */
int16 typlen; bool typbyval; char typalign; char typstorage; char typtype;
Oid typrelid;
Oid typsubscript;
Oid typelem;
Oid typarray;
Oid typcollation;
/* *Informationobtainedfromopfamilyentries * *ThesewillbeInvalidOidifnomatchcouldbefound,orifthe *informationhasn'tyetbeenrequested.Alsonotethatforarrayand *compositetypes,typcache.cchecksthatthecontainedtypesare *comparableorhashablebeforeallowingeq_opretctobecomeset.
*/
Oid btree_opf; /* the default btree opclass' family */
Oid btree_opintype; /* the default btree opclass' opcintype */
Oid hash_opf; /* the default hash opclass' family */
Oid hash_opintype; /* the default hash opclass' opcintype */
Oid eq_opr; /* the equality operator */
Oid lt_opr; /* the less-than operator */
Oid gt_opr; /* the greater-than operator */
Oid cmp_proc; /* the btree comparison function */
Oid hash_proc; /* the hash calculation function */
Oid hash_extended_proc; /* the extended hash calculation function */
/* *FieldscomputedwhenTYPECACHE_RANGE_INFOisrequested.Zeroesifnot *arangetypeorinformationhasn'tyetbeenrequested.Notethat *rng_cmp_proc_finfocouldbedifferentfromtheelementtype'sdefault *btreecomparisonfunction.
*/ struct TypeCacheEntry *rngelemtype; /* range's element type */
Oid rng_opfamily; /* opfamily to use for range comparisons */
Oid rng_collation; /* collation for comparisons, if any */
FmgrInfo rng_cmp_proc_finfo; /* comparison function */
FmgrInfo rng_canonical_finfo; /* canonicalization function, if any */
FmgrInfo rng_subdiff_finfo; /* difference function, if any */
/* *FieldscomputedwhenTYPECACHE_MULTIRANGE_INFOisrequired.
*/ struct TypeCacheEntry *rngtype; /* multirange's range underlying type */
/* *Domain'sbasetypeandtypmodifit'sadomaintype.Zeroesifnot *domain,orifinformationhasn'tbeenrequested.
*/
Oid domainBaseType;
int32 domainBaseTypmod;
/* We also maintain a list of all known domain-type cache entries */ struct TypeCacheEntry *nextDomain;
} TypeCacheEntry;
/* Bit flags to indicate which fields a given caller needs to have set */ #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
/* This value will not equal any valid tupledesc identifier, nor 0 */ #define INVALID_TUPLEDESC_IDENTIFIER ((uint64) 1)
/* *Callerswishingtomaintainalong-livedreferencetoadomain'sconstraint *setmuststoreitinoneofthese.UseInitDomainConstraintRef()and *UpdateDomainConstraintRef()tomanageit.Note:DomainConstraintStateis *consideredanexecutableexpressiontype,soit'sdefinedinexecnodes.h.
*/ typedefstruct DomainConstraintRef
{
List *constraints; /* list of DomainConstraintState nodes */
MemoryContext refctx; /* context holding DomainConstraintRef */
TypeCacheEntry *tcache; /* typcache entry for domain type */ bool need_exprstate; /* does caller need check_exprstate? */
/* Management data --- treat these fields as private to typcache.c */
DomainConstraintCache *dcc; /* current constraints, or NULL if none */
MemoryContextCallback callback; /* used to release refcount when done */
} DomainConstraintRef;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.