Re: can plpgsql returns more flexibe value ?

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: can plpgsql returns more flexibe value ?
Дата
Msg-id 41F10E3D.2020606@familyhealth.com.au
обсуждение исходный текст
Ответ на can plpgsql returns more flexibe value ?  ("Arnold.Zhu" <joint@shaucon.com>)
Список pgsql-hackers
> This problem annoys me, if I have more than several hundred function
> which returns different result set, like contains foreign keys, 
> I have to create many type for function's return.
> 
> Can plpgsql returns result set according to what exactly fetched,
> then take return type as references to store data for return.
> 
> Whether there is some better way to deal with this problem?

Yeah, you just make your function return 'SETOF record' and specify the 
types when you do the select:

select * from func() as (a int, b text);

Chris


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: ARC patent
Следующее
От: Manfred Koizar
Дата:
Сообщение: Re: ARC patent