Re: Ad hoc SETOF type definition? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Ad hoc SETOF type definition?
Date
Msg-id 538ed08d-55ba-4a51-8e46-4e424aaebb3c@aklaver.com
Whole thread Raw
In response to Re: Ad hoc SETOF type definition?  (Ron <ronljohnsonjr@gmail.com>)
Responses Re: Ad hoc SETOF type definition?  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
On 9/26/23 12:30, Ron wrote:
> On 9/26/23 13:15, Tom Lane wrote:
>> Ron <ronljohnsonjr@gmail.com> 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@aklaver.com




pgsql-general by date:

Previous
From: Maciek Sakrejda
Date:
Subject: Re: log_statement vs log_min_duration_statement
Next
From: Adrian Klaver
Date:
Subject: Re: Ad hoc SETOF type definition?