Alexander Farber <alexander.farber@gmail.com> writes:
> Why does PostgreSQL 9.5.4 print the error:
> ERROR: type " " does not exist at character 149
Hmph. Works for me, after reverse-engineering some tables and sample
data. Maybe your actual function text contains some non-breaking spaces,
or other weird stuff that didn't show up in your email? I find it a bit
fishy that it looks like there's two spaces after "resigned at the score"
in your function text, but only one in the error message.
regards, tom lane