Skip to content

Commit 02f3e55

Browse files
committed
match_clause_to_index should check only key columns
Alexander Korotkov per gripe from Tom Lane noticed on valgrind-enabled buildfarm members
1 parent 34602b0 commit 02f3e55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/optimizer/path/indxpath.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2244,8 +2244,8 @@ match_clause_to_index(IndexOptInfo *index,
22442244
if (!restriction_is_securely_promotable(rinfo, index->rel))
22452245
return;
22462246

2247-
/* OK, check each index column for a match */
2248-
for (indexcol = 0; indexcol < index->ncolumns; indexcol++)
2247+
/* OK, check each index key column for a match */
2248+
for (indexcol = 0; indexcol < index->nkeycolumns; indexcol++)
22492249
{
22502250
if (match_clause_to_indexcol(index,
22512251
indexcol,

0 commit comments

Comments
 (0)