diff options
author | Thomas G. Lockhart | 1999-09-13 04:21:21 +0000 |
---|---|---|
committer | Thomas G. Lockhart | 1999-09-13 04:21:21 +0000 |
commit | 400676afc9ca70c0f31d4d83a5037ac5f5539c4c (patch) | |
tree | 99228adb3a838b34f40fb2552c6f9aafca8b99e6 | |
parent | e86054e2c32a79f40fe959fc62dbc7aca36699c3 (diff) |
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.
-rw-r--r-- | src/backend/parser/parse_expr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 4aecd1f0481..955765ffb39 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.50 1999/07/11 02:04:19 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.50.2.1 1999/09/13 04:21:21 thomas Exp $ * *------------------------------------------------------------------------- */ @@ -467,7 +467,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)) { |