@@ -398,8 +398,7 @@ load_check_constraints(Oid parent_oid, Snapshot snapshot)
398
398
bool byVal = rangerel -> by_val ;
399
399
400
400
/* Sort ascending */
401
- tce = lookup_type_cache (prel -> atttype ,
402
- TYPECACHE_CMP_PROC | TYPECACHE_CMP_PROC_FINFO );
401
+ tce = lookup_type_cache (prel -> atttype , TYPECACHE_CMP_PROC | TYPECACHE_CMP_PROC_FINFO );
403
402
qsort_type_cmp_func = & tce -> cmp_proc_finfo ;
404
403
globalByVal = byVal ;
405
404
qsort (ranges , proc , sizeof (RangeEntry ), cmp_range_entries );
@@ -458,7 +457,7 @@ validate_range_constraint(Expr *expr, PartRelationInfo *prel, Datum *min, Datum
458
457
if (!and_clause ((Node * ) expr ))
459
458
return false;
460
459
461
- tce = lookup_type_cache (prel -> atttype , TYPECACHE_EQ_OPR | TYPECACHE_LT_OPR | TYPECACHE_GT_OPR );
460
+ tce = lookup_type_cache (prel -> atttype , TYPECACHE_BTREE_OPFAMILY );
462
461
463
462
/* check that left operand is >= operator */
464
463
opexpr = (OpExpr * ) linitial (boolexpr -> args );
@@ -517,7 +516,7 @@ validate_hash_constraint(Expr *expr, PartRelationInfo *prel, int *hash)
517
516
eqexpr = (OpExpr * ) expr ;
518
517
519
518
/* Is this an equality operator? */
520
- tce = lookup_type_cache (prel -> atttype , TYPECACHE_EQ_OPR );
519
+ tce = lookup_type_cache (prel -> atttype , TYPECACHE_BTREE_OPFAMILY );
521
520
if (get_op_opfamily_strategy (eqexpr -> opno , tce -> btree_opf ) != BTEqualStrategyNumber )
522
521
return false;
523
522
0 commit comments