|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.17 1997/09/12 04:07:36momjian Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.18 1997/09/22 04:19:36vadim Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -1044,7 +1044,22 @@ ExecEvalOr(Expr *orExpr, ExprContext *econtext, bool *isNull)
|
1044 | 1044 | * ----------------
|
1045 | 1045 | */
|
1046 | 1046 | if (*isNull)
|
| 1047 | +{ |
1047 | 1048 | IsNull=*isNull;
|
| 1049 | +/* |
| 1050 | + * Many functions don't (or can't!) check is an argument |
| 1051 | + * NULL or NOT_NULL and may return TRUE (1) with *isNull TRUE |
| 1052 | + * (an_int4_column <> 1: int4ne returns TRUE for NULLs). |
| 1053 | + * Not having time to fix function manager I want to fix |
| 1054 | + * OR: if we had 'x <> 1 OR x isnull' then TRUE, TRUE were |
| 1055 | + * returned by 'x <> 1' for NULL ... but ExecQualClause say |
| 1056 | + * that qualification *fails* if isnull is TRUE for all values |
| 1057 | + * returned by ExecEvalExpr. So, force this rule here: if isnull |
| 1058 | + * is TRUE then clause failed. Note: nullvalue() & nonnullvalue() |
| 1059 | + * always set isnull to FALSE for NULLs.- vadim 09/22/97 |
| 1060 | + */ |
| 1061 | +const_value=0; |
| 1062 | +} |
1048 | 1063 |
|
1049 | 1064 | /* ----------------
|
1050 | 1065 | * if we have a true result, then we return it.
|
|