Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5c551be

Browse files
committed
Merge master
2 parents 28c60fe + c9f7c99 commit 5c551be

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

init.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,7 @@ load_check_constraints(Oid parent_oid, Snapshot snapshot)
398398
bool 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);
403402
qsort_type_cmp_func = &tce->cmp_proc_finfo;
404403
globalByVal = byVal;
405404
qsort(ranges, proc, sizeof(RangeEntry), cmp_range_entries);
@@ -458,7 +457,7 @@ validate_range_constraint(Expr *expr, PartRelationInfo *prel, Datum *min, Datum
458457
if (!and_clause((Node *) expr))
459458
return 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 */
464463
opexpr = (OpExpr *) linitial(boolexpr->args);
@@ -517,7 +516,7 @@ validate_hash_constraint(Expr *expr, PartRelationInfo *prel, int *hash)
517516
eqexpr = (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);
521520
if (get_op_opfamily_strategy(eqexpr->opno, tce->btree_opf) != BTEqualStrategyNumber)
522521
return false;
523522

pg_pathman.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,7 @@ get_cmp_func(Oid type1, Oid type2)
222222

223223
cmp_func = palloc(sizeof(FmgrInfo));
224224
tce = lookup_type_cache(type1,
225-
TYPECACHE_EQ_OPR | TYPECACHE_LT_OPR | TYPECACHE_GT_OPR |
226-
TYPECACHE_CMP_PROC | TYPECACHE_CMP_PROC_FINFO);
225+
TYPECACHE_BTREE_OPFAMILY | TYPECACHE_CMP_PROC | TYPECACHE_CMP_PROC_FINFO);
227226
cmp_proc_oid = get_opfamily_proc(tce->btree_opf,
228227
type1,
229228
type2,
@@ -868,7 +867,9 @@ handle_binary_opexpr(const PartRelationInfo *prel, WrapperNode *result,
868867
TypeCacheEntry *tce;
869868

870869
/* Determine operator type */
871-
tce = lookup_type_cache(v->vartype, TYPECACHE_BTREE_OPFAMILY | TYPECACHE_CMP_PROC | TYPECACHE_CMP_PROC_FINFO);
870+
tce = lookup_type_cache(v->vartype,
871+
TYPECACHE_BTREE_OPFAMILY | TYPECACHE_CMP_PROC | TYPECACHE_CMP_PROC_FINFO);
872+
872873
strategy = get_op_opfamily_strategy(expr->opno, tce->btree_opf);
873874
cmp_proc_oid = get_opfamily_proc(tce->btree_opf,
874875
c->consttype,

0 commit comments

Comments
 (0)