File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/backend/optimizer/util Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 88 *
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/optimizer/util/clauses.c,v 1.193 2005/04/06 16:34:06 tgl Exp $
11+ * $PostgreSQL: pgsql/src/backend/optimizer/util/clauses.c,v 1.194 2005/04/10 20:57:32 tgl Exp $
1212 *
1313 * HISTORY
1414 * AUTHOR DATE MAJOR EVENT
@@ -1788,6 +1788,10 @@ eval_const_expressions_mutator(Node *node,
17881788 newargs = lappend (newargs , e );
17891789 }
17901790
1791+ /* If all the arguments were constant null, the result is just null */
1792+ if (newargs == NIL )
1793+ return (Node * ) makeNullConst (coalesceexpr -> coalescetype );
1794+
17911795 newcoalesce = makeNode (CoalesceExpr );
17921796 newcoalesce -> coalescetype = coalesceexpr -> coalescetype ;
17931797 newcoalesce -> args = newargs ;
You can’t perform that action at this time.
0 commit comments