From: Tom Lane Date: Sun, 7 Feb 1999 03:02:21 +0000 (+0000) Subject: Fix bracketing error in CaseExpr code X-Git-Tag: REL6_5~707 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65d320e7e420ea41f86764bda351f1931274f1e0;p=postgresql Fix bracketing error in CaseExpr code --- diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c index 1b8ea80e19..ddbb791433 100644 --- a/src/backend/optimizer/util/tlist.c +++ b/src/backend/optimizer/util/tlist.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.23 1999/02/03 21:16:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.24 1999/02/07 03:02:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -509,12 +509,13 @@ flatten_tlistentry(Node *tlistentry, List *flat_tlist) else if (case_clause(tlistentry)) { CaseExpr *cexpr = (CaseExpr *) tlistentry; - CaseWhen *cwhen; List *elt = NIL; foreach(elt, cexpr->args) - cwhen = (CaseWhen *)lfirst(elt); + { + CaseWhen *cwhen = (CaseWhen *)lfirst(elt); cwhen->result = flatten_tlistentry(cwhen->result, flat_tlist); + } cexpr->defresult = flatten_tlistentry(cexpr->defresult, flat_tlist); return ((Node *) cexpr);