postgres.git / summary / log / commit / refs
commit 02f3e558f21c0fbec9f94d5de9ad34f321eb0e57
Author: Teodor Sigaev <teodor@sigaev.ru>
Date: Sun Apr 08 16:58:15 2018 +0000
match_clause_to_index should check only key columns
Alexander Korotkov per gripe from Tom Lane noticed on valgrind-enabled
buildfarm members
src/backend/optimizer/path/indxpath.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index cc607dcdfaa..bf42b54970c 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -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,
[parent: 34602b0a1dfd]