Carlos Henrique Reimer <carlos(dot)reimer(at)opendb(dot)com(dot)br> writes:
> Yes, once correct schema was included in the search_path, VACUUM and ANALYZE
> run fine again.
You'd be better advised to fix the function so it works regardless of
caller's search_path. As-is, it's a loaded gun pointed at your foot.
regards, tom lane