Michael Fuhr <[EMAIL PROTECTED]> writes:
> CREATE TABLE foo (x integer);
> EXPLAIN
> SELECT CASE x = 1 WHEN true THEN 1 ELSE 0 END AS y
> FROM foo
> ORDER BY y;
Fixed, but this is a bit too late for 8.1.1. Meanwhile the easy way to
avoid the bug is to write the CASE in a less obtuse form, like
CASE WHEN x = 1 THEN 1 ELSE 0 END
or
CASE x WHEN 1 THEN 1 ELSE 0 END
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq