"Maksym Boguk" <Maxim.Boguk@gmail.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