aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
authorThomas G. Lockhart <lockhart@fourpalms.org>1999-09-13 04:14:56 +0000
committerThomas G. Lockhart <lockhart@fourpalms.org>1999-09-13 04:14:56 +0000
commitf0f73b316d3341c76ce776fd3f21bb7d1617570d (patch)
tree359d48285b8dbd492fdb95fa52b61d4fd4ee1592 /src/backend/parser/parse_expr.c
parent3ec5232363907a8feb65df190c1a97b62a772804 (diff)
downloadpostgresql-f0f73b316d3341c76ce776fd3f21bb7d1617570d.tar.gz
postgresql-f0f73b316d3341c76ce776fd3f21bb7d1617570d.zip
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.
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r--src/backend/parser/parse_expr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index a2280a74511..ee9d3077283 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -7,7 +7,7 @@
*
*
* 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)
* only bother with conversion if not NULL and
* different type...
*/
- if (wtype && (wtype != ptype))
+ if (wtype && (wtype != UNKNOWNOID)
+ && (wtype != ptype))
{
if (can_coerce_type(1, &wtype, &ptype))
{