Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> Following case statement is legal but fails in 6.5.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
Still there in current sources, too. Looks like it's the "else null"
that triggers the problem --- probably the code that is resolving the
final output type of the CASE expression isn't coping with a null.
I think this is Lockhart's turf, but I can have a go at it if he hasn't
got time to work on it...
regards, tom lane