Honza Rudovsky <XRUDOVSK@cs.felk.cvut.cz> writes:
> But when I try to run this (or any other) PLPGSQL function, i get this
> error message: "plpgsql: ERROR during compile of xxx near line 1".
Surely that's not the *only* message that comes out. There should be
some mention of what the syntax error is exactly.
FWIW, if you are putting in known-good examples, the only gotcha I'm
aware of is that until recently the plpgsql parser wouldn't accept
carriage return (\r) characters as whitespace. Depending on what
platform you're on and what tools you're using, perhaps newlines
are being pasted in as \r or \r\n instead of \n. If the error
message has peculiar-looking formatting then suspect this even more.
regards, tom lane