aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r--src/backend/parser/parse_expr.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index 08f0439e7ed..65d03adc494 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -2170,8 +2170,7 @@ make_row_comparison_op(ParseState *pstate, List *opname,
List *opfamilies;
ListCell *l,
*r;
- List **opfamily_lists;
- List **opstrat_lists;
+ List **opinfo_lists;
Bitmapset *strats;
int nopers;
int i;
@@ -2241,8 +2240,7 @@ make_row_comparison_op(ParseState *pstate, List *opname,
* containing the operators, and see which interpretations (strategy
* numbers) exist for each operator.
*/
- opfamily_lists = (List **) palloc(nopers * sizeof(List *));
- opstrat_lists = (List **) palloc(nopers * sizeof(List *));
+ opinfo_lists = (List **) palloc(nopers * sizeof(List *));
strats = NULL;
i = 0;
foreach(l, opexprs)
@@ -2251,17 +2249,18 @@ make_row_comparison_op(ParseState *pstate, List *opname,
Bitmapset *this_strats;
ListCell *j;
- get_op_btree_interpretation(opno,
- &opfamily_lists[i], &opstrat_lists[i]);
+ opinfo_lists[i] = get_op_btree_interpretation(opno);
/*
- * convert strategy number list to a Bitmapset to make the
+ * convert strategy numbers into a Bitmapset to make the
* intersection calculation easy.
*/
this_strats = NULL;
- foreach(j, opstrat_lists[i])
+ foreach(j, opinfo_lists[i])
{
- this_strats = bms_add_member(this_strats, lfirst_int(j));
+ OpBtreeInterpretation *opinfo = lfirst(j);
+
+ this_strats = bms_add_member(this_strats, opinfo->strategy);
}
if (i == 0)
strats = this_strats;
@@ -2309,14 +2308,15 @@ make_row_comparison_op(ParseState *pstate, List *opname,
for (i = 0; i < nopers; i++)
{
Oid opfamily = InvalidOid;
+ ListCell *j;
- forboth(l, opfamily_lists[i], r, opstrat_lists[i])
+ foreach(j, opinfo_lists[i])
{
- int opstrat = lfirst_int(r);
+ OpBtreeInterpretation *opinfo = lfirst(j);
- if (opstrat == rctype)
+ if (opinfo->strategy == rctype)
{
- opfamily = lfirst_oid(l);
+ opfamily = opinfo->opfamily_id;
break;
}
}