Commit 02f3e558 authored by Teodor Sigaev's avatar Teodor Sigaev

match_clause_to_index should check only key columns

Alexander Korotkov per gripe from Tom Lane noticed on valgrind-enabled
buildfarm members
parent 34602b0a
......@@ -2244,8 +2244,8 @@ match_clause_to_index(IndexOptInfo *index,
if (!restriction_is_securely_promotable(rinfo, index->rel))
return;
/* OK, check each index column for a match */
for (indexcol = 0; indexcol < index->ncolumns; indexcol++)
/* OK, check each index key column for a match */
for (indexcol = 0; indexcol < index->nkeycolumns; indexcol++)
{
if (match_clause_to_indexcol(index,
indexcol,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment