Content-Length: 273729 | pFad | http://github.com/postgrespro/postgres_cluster/commit/68d704edbfe14fd8d21545b244c3f6824e0fbb8a

FD Minimal fix for crash bug in quals_match_foreign_key. · postgrespro/postgres_cluster@68d704e · GitHub
Skip to content

Commit 68d704e

Browse files
committed
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
1 parent c7ea68f commit 68d704e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/optimizer/path/costsize.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3944,13 +3944,13 @@ quals_match_foreign_key(PlannerInfo *root, ForeignKeyOptInfo *fkinfo,
39443944
if (i > 0 && bms_is_member(quallstidx, qualmatches))
39453945
continue;
39463946

3947-
/*
3948-
* Here since 'usefulquals' only contains bitmap indexes for quals
3949-
* of type "var op var" we can safely skip checking this.
3950-
*/
39513947
rinfo = (RestrictInfo *) lfirst(lc);
39523948
clause = (OpExpr *) rinfo->clause;
39533949

3950+
/* only OpExprs are useful for consideration */
3951+
if (!IsA(clause, OpExpr))
3952+
continue;
3953+
39543954
/*
39553955
* If the operator does not match then there's little point in
39563956
* checking the operands.

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/68d704edbfe14fd8d21545b244c3f6824e0fbb8a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy