Commit f0f73b31 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Allow CASE statement to contain *only* untyped result clauses or nulls.

 Almost worked before, but forgot one place to check.
 Reported by Tatsuo Ishii.
Still does not do the right thing if inserting into a non-string target
 column. Should look for a type coersion later, but doesn't.
parent 3ec52323
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.57 1999/08/25 23:21:34 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.58 1999/09/13 04:14:56 thomas Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -410,7 +410,8 @@ transformExpr(ParseState *pstate, Node *expr, int precedence) ...@@ -410,7 +410,8 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
* only bother with conversion if not NULL and * only bother with conversion if not NULL and
* different type... * different type...
*/ */
if (wtype && (wtype != ptype)) if (wtype && (wtype != UNKNOWNOID)
&& (wtype != ptype))
{ {
if (can_coerce_type(1, &wtype, &ptype)) if (can_coerce_type(1, &wtype, &ptype))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment