diff options
author | Vadim B. Mikheev <vadim4o@yahoo.com> | 1998-07-31 15:10:40 +0000 |
---|---|---|
committer | Vadim B. Mikheev <vadim4o@yahoo.com> | 1998-07-31 15:10:40 +0000 |
commit | 83d3626b1f43cb507755d27e914e6788c17cd8ac (patch) | |
tree | 49580cf1dd73fa58040c379ae8b78e262d044cd5 /src | |
parent | f73fc6eb2908104e4ca0a28106806364cc085c98 (diff) | |
download | postgresql-83d3626b1f43cb507755d27e914e6788c17cd8ac.tar.gz postgresql-83d3626b1f43cb507755d27e914e6788c17cd8ac.zip |
Matching clauses to functional indices was broken, now fixed.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/optimizer/path/indxpath.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 3a30a8a7fdc..3722688a21b 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.18 1998/07/27 19:37:58 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.19 1998/07/31 15:10:40 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -405,10 +405,10 @@ group_clauses_by_indexkey(RelOptInfo *rel, int curIndxKey; Oid curClass; - if (clauseinfo_list == NIL) + if (clauseinfo_list == NIL || indexkeys[0] == 0) return NIL; - while (!DoneMatchingIndexKeys(indexkeys, index)) + do { List *tempgroup = NIL; @@ -438,7 +438,7 @@ group_clauses_by_indexkey(RelOptInfo *rel, indexkeys++; classes++; - } + } while (!DoneMatchingIndexKeys(indexkeys, index)); /* clausegroup holds all matched clauses ordered by indexkeys */ @@ -469,10 +469,10 @@ group_clauses_by_ikey_for_joins(RelOptInfo *rel, Oid curClass; bool jfound = false; - if (join_cinfo_list == NIL) + if (join_cinfo_list == NIL || indexkeys[0] == 0) return NIL; - while (!DoneMatchingIndexKeys(indexkeys, index)) + do { List *tempgroup = NIL; @@ -518,7 +518,7 @@ group_clauses_by_ikey_for_joins(RelOptInfo *rel, indexkeys++; classes++; - } + } while (!DoneMatchingIndexKeys(indexkeys, index)); /* clausegroup holds all matched clauses ordered by indexkeys */ |