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

From Ron
Subject Re: Ad hoc SETOF type definition?
Date
Msg-id 73c7a357-62fe-3274-7f27-7ef9adc3b9b5@gmail.com
Whole thread Raw
In response to Re: Ad hoc SETOF type definition?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Ad hoc SETOF type definition?
Re: Ad hoc SETOF type definition?
List pgsql-general
On 9/26/23 12:46, Tom Lane wrote:
Ron <ronljohnsonjr@gmail.com> writes:
Is there a way to define the SETOF record on the fly, like you do with 
RETURNS TABLE (f1 type1, f2 type2)?
Doesn't RETURNS TABLE meet the need already?

That rationale means that RETURN SETOF is not needed, and can be removed from Pg, since "RETURNS TABLE meet the need already".

But of course there are times when RETURN SETOF is useful.

So... can ad hoc SETOF definitions be created in the function definition, or is CREATE TYPE the only way to do it?

--
Born in Arizona, moved to Babylonia.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Ad hoc SETOF type definition?
Next
From: Adrian Klaver
Date:
Subject: Re: Ad hoc SETOF type definition?