Larry,
> > You seem to be missing most of your function, here.
> I just did a head. Note the line count above. It's only 147
> lines, but the error refers to line 206.
Obviously postgres is counting lines differently from you.
Post the whole thing, or start from the bottom of the function and work your
way up until you find the problem. Most likely issue: missing semicolon.
--
-Josh Berkus
Aglio Database Solutions
San Francisco