Skip to content
Snippets Groups Projects
Commit 68d704ed authored by Robert Haas's avatar Robert Haas
Browse files

Minimal fix for crash bug in quals_match_foreign_key.

Discussion is still underway as to whether to revert the entire patch
that added this function, but that discussion may not conclude before
beta1.  So, in the meantime, let's do at least this much.

David Rowley
parent c7ea68ff
No related branches found
No related tags found
No related merge requests found
...@@ -3944,13 +3944,13 @@ quals_match_foreign_key(PlannerInfo *root, ForeignKeyOptInfo *fkinfo, ...@@ -3944,13 +3944,13 @@ quals_match_foreign_key(PlannerInfo *root, ForeignKeyOptInfo *fkinfo,
if (i > 0 && bms_is_member(quallstidx, qualmatches)) if (i > 0 && bms_is_member(quallstidx, qualmatches))
continue; continue;
/*
* Here since 'usefulquals' only contains bitmap indexes for quals
* of type "var op var" we can safely skip checking this.
*/
rinfo = (RestrictInfo *) lfirst(lc); rinfo = (RestrictInfo *) lfirst(lc);
clause = (OpExpr *) rinfo->clause; clause = (OpExpr *) rinfo->clause;
/* only OpExprs are useful for consideration */
if (!IsA(clause, OpExpr))
continue;
/* /*
* If the operator does not match then there's little point in * If the operator does not match then there's little point in
* checking the operands. * checking the operands.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment