*** src/backend/optimizer/path/indxpath.c.orig Fri Jul 31 22:54:58 1998 --- src/backend/optimizer/path/indxpath.c Fri Jul 31 22:56:38 1998 *************** *** 410,419 **** int curIndxKey; Oid curClass; ! if (clauseinfo_list == NIL) return NIL; ! while (!DoneMatchingIndexKeys(indexkeys, index)) { List *tempgroup = NIL; --- 410,419 ---- int curIndxKey; Oid curClass; ! if (clauseinfo_list == NIL || indexkeys[0] == 0) return NIL; ! do { List *tempgroup = NIL; *************** *** 443,449 **** indexkeys++; classes++; ! } /* clausegroup holds all matched clauses ordered by indexkeys */ --- 443,449 ---- indexkeys++; classes++; ! } while (!DoneMatchingIndexKeys(indexkeys, index)); /* clausegroup holds all matched clauses ordered by indexkeys */ *************** *** 474,483 **** Oid curClass; bool jfound = false; ! if (join_cinfo_list == NIL) return NIL; ! while (!DoneMatchingIndexKeys(indexkeys, index)) { List *tempgroup = NIL; --- 474,483 ---- Oid curClass; bool jfound = false; ! if (join_cinfo_list == NIL || indexkeys[0] == 0) return NIL; ! do { List *tempgroup = NIL; *************** *** 523,529 **** indexkeys++; classes++; ! } /* clausegroup holds all matched clauses ordered by indexkeys */ --- 523,529 ---- indexkeys++; classes++; ! } while (!DoneMatchingIndexKeys(indexkeys, index)); /* clausegroup holds all matched clauses ordered by indexkeys */