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 Jan. 12
I intend to apply this once 8.0.0 is out the door, barring any objections. -Neil
Index: src/test/regress/expected/case.out =================================================================== RCS file: /var/lib/cvs/pgsql/src/test/regress/expected/case.out,v retrieving revision 1.7 diff -c -r1.7 case.out *** src/test/regress/expected/case.out 1 Dec 2004 19:00:55 -0000 1.7 --- src/test/regress/expected/case.out 17 Jan 2005 02:51:17 -0000 *************** *** 72,77 **** --- 72,84 ---- 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 -- Index: src/test/regress/sql/case.sql =================================================================== RCS file: /var/lib/cvs/pgsql/src/test/regress/sql/case.sql,v retrieving revision 1.4 diff -c -r1.4 case.sql *** src/test/regress/sql/case.sql 6 Jan 2000 06:41:55 -0000 1.4 --- src/test/regress/sql/case.sql 17 Jan 2005 02:49:33 -0000 *************** *** 58,63 **** --- 58,66 ---- 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 --
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend