particularly the footnote to the bit about "Select the first non-unknown input type as the candidate type, then consider each other non-unknown input type, left to right."
The WHEN clauses have exactly nothing to do with the result type of the CASE: it's the THEN and ELSE clauses that supply the result.
regards, tom lane
--
Francisco J. Ossandon Bioinformatician Ph.D. in Biotechnology