Skip to content

Commit f0f73b3

Browse files
author
Thomas G. Lockhart
committed
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.
1 parent 3ec5232 commit f0f73b3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/parser/parse_expr.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.57 1999/08/25 23:21:34 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.58 1999/09/13 04:14:56 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -410,7 +410,8 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
410410
* only bother with conversion if not NULL and
411411
* different type...
412412
*/
413-
if (wtype && (wtype != ptype))
413+
if (wtype && (wtype != UNKNOWNOID)
414+
&& (wtype != ptype))
414415
{
415416
if (can_coerce_type(1, &wtype, &ptype))
416417
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy