Re: Ad hoc SETOF type definition?
| От | Ron |
|---|---|
| Тема | Re: Ad hoc SETOF type definition? |
| Дата | |
| Msg-id | 73c7a357-62fe-3274-7f27-7ef9adc3b9b5@gmail.com обсуждение исходный текст |
| Ответ на | Re: Ad hoc SETOF type definition? (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Ad hoc SETOF type definition?
Re: Ad hoc SETOF type definition? |
| Список | pgsql-general |
On 9/26/23 12:46, Tom Lane wrote:
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?
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.
Born in Arizona, moved to Babylonia.
В списке pgsql-general по дате отправления: