"Neal M. Holtz" <nholtz@docuweb.ca> writes:
> To maintain some compatibility with some non-Postgresql applications,
> we thought it would be useful to retain the spaces in the column
> names. And in fact, that works just fine in normal queries,
> but not from within function bodies.
Yeah, the plpgsql lexer has an extremely lame approach to handling
double-quoted identifiers (AFAICT, it just acts as though " is an
ordinary identifier character :-(). I have a todo item to fix that
someday, if no one gets around to it before I do. It should be
updated to use the same lexing rules the main SQL lexer does.
regards, tom lane