Andrew Gierth <andrew@tao11.riddles.org.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