Attached is the patch to fix RM #4362 trigger function create script.
Please review it.
While I can see how this works, I question why we have the string "SETOF" in prorettypname anyway? That's a separate property, so it should be in a separate variable. What if I have a type called "SETOFDavesStuff" (unlikely, but it illustrates the point)?