>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
Tom> I didn't much like the "initial_nulls" counter in your patch, but
Tom> actually there's no reason we can't just push an all-nulls row
Tom> into the tuplestore immediately on seeing a null, the same way as
Tom> happens in the last-ditch case at the bottom of
Tom> ExecMakeTableFunctionResult. I whacked that around a bit and
Tom> pushed it.
I did think about that, but the existing code seems to go out of its way
to build the tuplestore using the tupdesc obtained from the actual
function result row, rather than the "expected" tupdesc, and it wasn't
really obvious why that was.
--
Andrew (irc:RhodiumToad)