diff options
author | Neil Conway <neilc@samurai.com> | 2005-01-17 03:39:37 +0000 |
---|---|---|
committer | Neil Conway <neilc@samurai.com> | 2005-01-17 03:39:37 +0000 |
commit | 48e2bb13c964f118138c183f3038f7c214e85806 (patch) | |
tree | 25e751fa9997f22c2879bf98860be4c4a57d32af | |
parent | 0d45116eb0517737856a58fbf301911e982be3ab (diff) | |
download | postgresql-48e2bb13c964f118138c183f3038f7c214e85806.tar.gz postgresql-48e2bb13c964f118138c183f3038f7c214e85806.zip |
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.
-rw-r--r-- | src/test/regress/expected/case.out | 7 | ||||
-rw-r--r-- | src/test/regress/sql/case.sql | 3 |
2 files changed, 10 insertions, 0 deletions
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 -- |