diff options
| author | Tom Lane | 1999-09-18 23:30:05 +0000 |
|---|---|---|
| committer | Tom Lane | 1999-09-18 23:30:05 +0000 |
| commit | 7fe22f5c8b09086c85fba906518c64315970665e (patch) | |
| tree | f714494370b50c1809e5b7417bd646d93aaa2393 /src | |
| parent | bed8cf4d830b8d34e90be282c18b5cba8d88d02d (diff) | |
Back-patch fix for NULL condition in CASE.
Diffstat (limited to 'src')
| -rw-r--r-- | src/backend/executor/execQual.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c index 58acc885ba2..5e2cc88c52b 100644 --- a/src/backend/executor/execQual.c +++ b/src/backend/executor/execQual.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.53 1999/06/12 19:22:40 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.53.2.1 1999/09/18 23:30:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1128,9 +1128,10 @@ ExecEvalCase(CaseExpr *caseExpr, ExprContext *econtext, bool *isNull) /* * if we have a true test, then we return the result, since the - * case statement is satisfied. + * case statement is satisfied. A NULL result from the test is + * not considered true. */ - if (DatumGetInt32(const_value) != 0) + if (DatumGetInt32(const_value) != 0 && ! *isNull) { const_value = ExecEvalExpr((Node *) wclause->result, econtext, |
