On 9/26/23 12:30, Ron wrote:
On 9/26/23 13:15, Tom Lane wrote:
Ron <ronljohnsonjr@xxxxxxxxx> writes:
On 9/26/23 12:46, Tom Lane wrote:
I'm not really sure what functionality you think is missing from RETURNS
TABLE, granting that you do want to return a set of rows and not exactly
one row.
There might be some other logic in the body of the FOR loop that is not
practical to embed in the body of the SELECT statement.
I think you are conflating RETURNS TABLE and RETURN QUERY. You can build
a 'TABLE' from variables outside of a query.
--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx