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?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Ad hoc SETOF type definition?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Ad hoc SETOF type definition?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Ad hoc SETOF type definition?