File tree 1 file changed +11
-5
lines changed
src/backend/optimizer/path 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.21 1998/08/01 22:44:53 momjian Exp $
11
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.22 1998/08/02 07:10:38 momjian Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -307,13 +307,18 @@ match_index_orclause(RelOptInfo *rel,
307
307
List * other_matching_indices )
308
308
{
309
309
Node * clause = NULL ;
310
- List * matched_indices = other_matching_indices ;
310
+ List * matched_indices ;
311
311
List * index_list = NIL ;
312
312
List * clist ;
313
313
314
314
foreach (clist , or_clauses )
315
315
{
316
316
clause = lfirst (clist );
317
+ if (other_matching_indices )
318
+ matched_indices = lfirst (other_matching_indices );
319
+ else
320
+ matched_indices = NIL ;
321
+
317
322
if (is_opclause (clause ) &&
318
323
op_class (((Oper * ) ((Expr * ) clause )-> oper )-> opno ,
319
324
xclass , index -> relam ) &&
@@ -330,11 +335,12 @@ match_index_orclause(RelOptInfo *rel,
330
335
{
331
336
matched_indices = lcons (index , matched_indices );
332
337
}
333
- index_list = lappend (index_list , matched_indices );
334
338
335
339
/* for the first index, we are creating the indexids list */
336
- if (matched_indices )
337
- matched_indices = lnext (matched_indices );
340
+ index_list = lappend (index_list , matched_indices );
341
+
342
+ if (other_matching_indices )
343
+ other_matching_indices = lnext (other_matching_indices );
338
344
}
339
345
return (index_list );
340
346
You can’t perform that action at this time.
0 commit comments