Josh Goldberg <josh@4dmatrix.com> writes:
> I was experimenting with moving some of my case logic out of the
> application and into sql and found a strange EXPLAIN result with one of
> my COALESCE statements. Why is each subselect listed twice? This is in
> 7.3.4 on freebsd 4.8.
Prior to 7.4, COALESCE is just a parse-time macro for a CASE construct,
and so the items do appear twice in the CASE.
regards, tom lane