projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d469261
)
Allow CASE statement to contain *only* untyped result clauses or nulls.
author
Thomas G. Lockhart
<
[email protected]
>
Mon, 13 Sep 1999 04:21:21 +0000
(
04:21
+0000)
committer
Thomas G. Lockhart
<
[email protected]
>
Mon, 13 Sep 1999 04:21:21 +0000
(
04:21
+0000)
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.
src/backend/parser/parse_expr.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/parser/parse_expr.c
b/src/backend/parser/parse_expr.c
index 257a0d73200405890a77c8051c9475585aee5eb9..683475c8755d1541225e043b5ebb54ef4d5c37d3 100644
(file)
--- a/
src/backend/parser/parse_expr.c
+++ b/
src/backend/parser/parse_expr.c
@@
-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))
{