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-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=413d71f10756855a0c4a6a99a8cfea3d443c3809;p=users%2Fbernd%2Fpostgres.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 e0b94fff6a..df3fb094b3 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 20fbf81153..85e17e0807 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 --