Following case statement is legal but fails in 6.5.1.
drop table t1;
DROP
create table t1(i int);
CREATE
insert into t1 values(-1);
INSERT 4047465 1
insert into t1 values(0);
INSERT 4047466 1
insert into t1 values(1);
INSERT 4047467 1
select i, case when i < 0 then 'minus' when i = 0 then 'zero' when i > 0 then 'plus' else null end
from t1;
ERROR: Unable to locate type oid 0 in catalog
note that:
select i, case when i < 0 then 'minus' when i = 0 then 'zero' when i > 0 then 'plus' end
from t1;
also causes the same error.
---
Tatsuo Ishii