From: Neil Conway Date: Mon, 17 Jan 2005 03:39:37 +0000 (+0000) Subject: This trivial patch adds a regression test for CASE expressions that use X-Git-Tag: REL8_0_0~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=48e2bb13c964f118138c183f3038f7c214e85806;p=thirdparty%2Fpostgresql.git 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. --- diff --git a/src/test/regress/expected/case.out b/src/test/regress/expected/case.out index e0b94fff6a1..df3fb094b3e 100644 --- a/src/test/regress/expected/case.out +++ b/src/test/regress/expected/case.out @@ -72,6 +72,13 @@ SELECT '6' AS "One", 6 | 6 (1 row) +-- Test for cases involving untyped literals in test expression +SELECT CASE 'a' WHEN 'a' THEN 1 ELSE 2 END; + case +------ + 1 +(1 row) + -- -- Examples of targets involving tables -- diff --git a/src/test/regress/sql/case.sql b/src/test/regress/sql/case.sql index 20fbf811530..85e17e0807f 100644 --- a/src/test/regress/sql/case.sql +++ b/src/test/regress/sql/case.sql @@ -58,6 +58,9 @@ SELECT '6' AS "One", ELSE 7 END AS "Two WHEN with default"; +-- Test for cases involving untyped literals in test expression +SELECT CASE 'a' WHEN 'a' THEN 1 ELSE 2 END; + -- -- Examples of targets involving tables --