I'm trying to follow the instructions in the PostgreSQL manual. PostgreSQL: Documentation: 9.1: Control Structures My PostgreSQL server is version 9.1.14 on Windows 32-bit.
The following SQL statement is unexpectedly resulting in a syntax error:
SELECT
CASE 1
WHEN 1,2 THEN 'x'
ELSE 'y'
END;
I'm expecting it to return 'x';
The more traditional code runs fine, however:
SELECT
CASE 1
WHEN 1 THEN 'x'
WHEN 2 THEN 'x'
ELSE 'y'
END;