"Oleg Serov" <serovov(at)gmail(dot)com> writes:
> But if there are some records in t_table and we romove WHERE 1=0, we will
> have
> ERROR: wrong record type supplied in RETURN NEXT CONTEXT: PL/pgSQL function
> "t_func" line 9 at RETURN NEXT
I couldn't reproduce that here, at least not with versions newer than
8.0. Maybe you were testing a case that also involved dropped columns?
regards, tom lane