@@ -398,8 +398,7 @@ load_check_constraints(Oid parent_oid, Snapshot snapshot)
398398bool byVal = rangerel -> by_val ;
399399
400400/* 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 );
403402qsort_type_cmp_func = & tce -> cmp_proc_finfo ;
404403globalByVal = byVal ;
405404qsort (ranges ,proc ,sizeof (RangeEntry ),cmp_range_entries );
@@ -458,7 +457,7 @@ validate_range_constraint(Expr *expr, PartRelationInfo *prel, Datum *min, Datum
458457if (!and_clause ((Node * )expr ))
459458return false;
460459
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 );
462461
463462/* check that left operand is >= operator */
464463opexpr = (OpExpr * )linitial (boolexpr -> args );
@@ -517,7 +516,7 @@ validate_hash_constraint(Expr *expr, PartRelationInfo *prel, int *hash)
517516eqexpr = (OpExpr * )expr ;
518517
519518/* 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 );
521520if (get_op_opfamily_strategy (eqexpr -> opno ,tce -> btree_opf )!= BTEqualStrategyNumber )
522521return false;
523522