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

Fix a number of places that made faulty assumptions about

what is_opclause will accept.
This commit is contained in:
Tom Lane
1999-02-15 01:06:59 +00:00
parent 5500039843
commit dec354ca97
6 changed files with 127 additions and 56 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.17 1999/02/13 23:16:15 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.18 1999/02/15 01:06:57 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -206,7 +206,7 @@ compute_selec(Query *root, List *clauses, List *or_selectivities)
Cost s1 = 0;
List *clause = lfirst(clauses);
if (clauses == NULL)
if (clause == NULL)
s1 = 1.0;
else if (IsA(clause, Param))
{
@@ -351,7 +351,7 @@ compute_selec(Query *root, List *clauses, List *or_selectivities)
* an 'or' clause, but rather that of the single clause.
*/
if (length(clauses) < 2)
if (lnext(clauses) == NIL)
return s1;
else
{