summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path/clausesel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer/path/clausesel.c')
-rw-r--r--src/backend/optimizer/path/clausesel.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c
index ca068991c16..b9e97d414d8 100644
--- a/src/backend/optimizer/path/clausesel.c
+++ b/src/backend/optimizer/path/clausesel.c
@@ -579,6 +579,7 @@ clause_selectivity(PlannerInfo *root,
list_make2(var,
makeBoolConst(true,
false)),
+ InvalidOid,
varRelid);
}
}
@@ -650,13 +651,15 @@ clause_selectivity(PlannerInfo *root,
}
else if (is_opclause(clause) || IsA(clause, DistinctExpr))
{
- Oid opno = ((OpExpr *) clause)->opno;
+ OpExpr *opclause = (OpExpr *) clause;
+ Oid opno = opclause->opno;
if (treat_as_join_clause(clause, rinfo, varRelid, sjinfo))
{
/* Estimate selectivity for a join clause. */
s1 = join_selectivity(root, opno,
- ((OpExpr *) clause)->args,
+ opclause->args,
+ opclause->inputcollid,
jointype,
sjinfo);
}
@@ -664,7 +667,8 @@ clause_selectivity(PlannerInfo *root,
{
/* Estimate selectivity for a restriction clause. */
s1 = restriction_selectivity(root, opno,
- ((OpExpr *) clause)->args,
+ opclause->args,
+ opclause->inputcollid,
varRelid);
}