*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.31 1998/08/19 02:02:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.32 1998/08/31 07:19:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
index) &&
IsA(get_rightop((Expr *) clause), Const)) ||
(match_index_to_operand(indexkey,
- (Expr *) get_leftop((Expr *) clause),
+ (Expr *) get_rightop((Expr *) clause),
rel,
index) &&
- IsA(get_rightop((Expr *) clause), Const))))
+ IsA(get_leftop((Expr *) clause), Const))))
{
lfirst(matching_indices) = lcons(index, lfirst(matching_indices));
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.8 1998/08/01 22:12:13 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.9 1998/08/31 07:19:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
break;
}
}
+ /* do they all have indexes? */
if (index_flag)
{ /* used to be a lisp every function */
IndexPath *pathnode = makeNode(IndexPath);
{
List *ilist;
bool first_run = true;
+
+ /* if we don't match anything, return zeros */
+ *retIndexid = 0;
+ *retCost = 0.0;
+ *retSelec = 0.0;
foreach (ilist, indices)
{
}
}
- /* we didn't get any indexes, so zero return values */
- if (first_run)
- {
- *retIndexid = 0;
- *retCost = 0.0;
- *retSelec = 0.0;
- }
return;
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.20 1998/08/10 02:26:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.21 1998/08/31 07:19:56 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
bool
or_clause(Node *clause)
{
- return
- (clause != NULL &&
- nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == OR_EXPR);
+ return clause != NULL &&
+ nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == OR_EXPR);
}
/*