Re: SQL functions: avoid making a tuplestore unnecessarily

2025-05-02 Thread Tom Lane
I wrote: > Given the lack of field complaints over the many years it's been > like this, there doesn't seem to be a live problem. I think the > explanation for that is > (1) those mechanisms are never used to call set-returning functions, > (2) therefore, the tuplestore will not be called on to ho

SQL functions: avoid making a tuplestore unnecessarily

2025-04-18 Thread Tom Lane
(I'm not proposing this for v18, but I wanted to get the patch written while functions.c is still fresh in mind.) The attached patch changes functions.c so that we only make a tuplestore object if we're actually going to return multiple rows in it, that is if it's a set-returning function and we c