"Maksym Boguk" <Maxim(dot)Boguk(at)gmail(dot)com> writes:
> Oops... two rows where function returned zero rows just disappeared.
Yup, that's expected. This is one of many reasons why set-returning
functions in the targetlist aren't an especially good idea.
regards, tom lane