1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-06 07:49:08 +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/optimizer/util/clauses.c,v 1.12 1997/09/25 12:48:15 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.13 1997/12/22 05:42:14 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -431,7 +431,7 @@ contains_not(Node *clause)
if (not_clause(clause))
return (true);
if (or_clause(clause))
if (or_clause(clause) || and_clause(clause))
{
List *a;
@@ -518,7 +518,7 @@ fix_opid(Node *clause)
{
;
}
else if (or_clause(clause))
else if (or_clause(clause) || and_clause(clause))
{
fix_opids(((Expr *) clause)->args);
}