Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:
> BTW, did #4907 ever get fixed in the back branches?
No, I didn't think it was prudent to back-patch it. Also, #5240
represents an actual regression (cases that worked before 8.4 now
fail) whereas the plpgsql cases never have worked.
regards, tom lane