Edmund Bacon <ebacon(at)onesystem(dot)com> writes:
> The problem is that pg_restore is not correctly recognizing the ending
> $$ quotes on functions:
This is a known bug. There was a preliminary patch posted for it a
couple days ago.
regards, tom lane