1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-15 03:41:20 +03:00

Allow index use with OR clauses.

This commit is contained in:
Bruce Momjian
1998-08-01 22:12:13 +00:00
parent 0668aa8817
commit 0a2e5cdfc9
9 changed files with 289 additions and 318 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.9 1998/07/18 04:22:30 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.10 1998/08/01 22:12:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -159,19 +159,8 @@ set_rest_selec(Query *root, List *clauseinfo_list)
Cost
compute_clause_selec(Query *root, Node *clause, List *or_selectivities)
{
if (!is_opclause(clause))
{
/*
* if it's not an operator clause, then it is a boolean clause
* -jolly
*/
/*
* Boolean variables get a selectivity of 1/2.
*/
return (0.1);
}
if (is_opclause (clause))
return compute_selec(root, lcons(clause,NIL), or_selectivities);
else if (not_clause(clause))
{