Found strange behavior of postgres between 9.1 and 9.2. Can some one pointout the reason for the difference in column name of the output between the versions?
Postgres 9.1
postgres=> create table test (a int, b int);
CREATE TABLE
postgres=> insert into test values (1,1);
INSERT 0 1
postgres=> select case when exists (select 1 from test where a=1) then 0 else (select b from test where a=2) end;
case
------
0
(1 row)
Postgres 9.2
postgres=> select case when exists (select 1 from test where a=1) then 0 else (select b from test where a=2) end;