Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 48e2bb1

Browse files
author
Neil Conway
committed
This trivial patch adds a regression test for CASE expressions that use
an untyped literal in the CASE's test expression. This adds test coverage for a bug that was fixed by Tom on January 12.
1 parent 0d45116 commit 48e2bb1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/test/regress/expected/case.out

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ SELECT '6' AS "One",
7272
6 | 6
7373
(1 row)
7474

75+
-- Test for cases involving untyped literals in test expression
76+
SELECT CASE 'a' WHEN 'a' THEN 1 ELSE 2 END;
77+
case
78+
------
79+
1
80+
(1 row)
81+
7582
--
7683
-- Examples of targets involving tables
7784
--

src/test/regress/sql/case.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ SELECT '6' AS "One",
5858
ELSE 7
5959
END AS "Two WHEN with default";
6060

61+
-- Test for cases involving untyped literals in test expression
62+
SELECT CASE 'a' WHEN 'a' THEN 1 ELSE 2 END;
63+
6164
--
6265
-- Examples of targets involving tables
6366
--

0 commit comments

Comments
 (0)