1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-27 00:12:01 +03:00

Fix for select 1=1 or 2=2, select 1=1 and 2=2, and select sum(2+2).

This commit is contained in:
Bruce Momjian
1997-12-22 05:42:25 +00:00
parent 78a055a659
commit d404f1006b
10 changed files with 69 additions and 56 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.17 1997/09/18 20:20:20 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.18 1997/12/22 05:41:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -385,9 +385,7 @@ CheckPredExpr(Node *predicate, List *rangeTable, Oid baseRelOid)
CheckPredClause((Expr *) predicate, rangeTable, baseRelOid);
return;
}
else if (or_clause(predicate))
clauses = ((Expr *) predicate)->args;
else if (and_clause(predicate))
else if (or_clause(predicate) || and_clause(predicate))
clauses = ((Expr *) predicate)->args;
else
elog(WARN, "Unsupported partial-index predicate expression type");