|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.4 1996/11/08 05:56:55 momjian Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.5 1997/01/22 06:25:42 vadim Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -441,9 +441,17 @@ group_clauses_by_indexkey(Rel *rel, |
441 | 441 | */ |
442 | 442 | #defineIndexScanableOperand(opnd,indkeys,rel,index) \ |
443 | 443 | ((index->indproc == InvalidOid) ? \ |
444 | | -equal_indexkey_var(indkeys,opnd) : \ |
| 444 | +match_indexkey_operand(indkeys,opnd, rel) : \ |
445 | 445 | function_index_operand((Expr*)opnd,rel,index)) |
446 | 446 |
|
| 447 | +/* |
| 448 | + * There was |
| 449 | + *equal_indexkey_var(indkeys,opnd) : \ |
| 450 | + * above, and now |
| 451 | + *match_indexkey_operand(indkeys, opnd, rel) : \ |
| 452 | + * - vadim 01/22/97 |
| 453 | + */ |
| 454 | + |
447 | 455 | /* |
448 | 456 | * match_clause_to-indexkey-- |
449 | 457 | * Finds the first of a relation's available restriction clauses that |
@@ -513,7 +521,13 @@ match_clause_to_indexkey(Rel *rel, |
513 | 521 | /* |
514 | 522 | * Must try to commute the clause to standard s-arg format. |
515 | 523 | */ |
| 524 | +#ifdefINDEXSCAN_PATCH |
| 525 | +/* ...And here... - vadim 01/22/97 */ |
| 526 | +elseif ((leftop&&IsA(leftop,Const))|| |
| 527 | +(leftop&&IsA(leftop,Param))) |
| 528 | +#else |
516 | 529 | elseif (leftop&&IsA(leftop,Const)) |
| 530 | +#endif |
517 | 531 | { |
518 | 532 | restrict_op= |
519 | 533 | get_commutator(((Oper*)((Expr*)clause)->oper)->opno); |
|