Re: SETOF (was: Function example returning more then 1

Поиск
Список
Период
Сортировка
Искать
От
Stephan Szabo
Тема
Re: SETOF (was: Function example returning more then 1
Дата
Msg-id
20030227082228.P86039-100000@megazone23.bigpanda.com
Ответ на
Список
Дерево обсуждения
Re: SETOF (was: Function example returning more then 1 Kolus Maximiliano <Kolus.maximiliano@bcr.com.ar>
Re: SETOF (was: Function example returning more then 1 Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: SETOF (was: Function example returning more then 1 Darko Prenosil <darko.prenosil@finteh.hr>
Re: SETOF (was: Function example returning more then 1 Antti Haapala <antti.haapala@iki.fi>

On Thu, 27 Feb 2003, Kolus Maximiliano wrote:

> > 	You can't return more than one return value from function, but that
> > value can be of composite type.For example :"setof text" or "setof record"
> > are such types.
>
> 	Can you use functions returning "setof"s as if they were "normal"
> selects?.
>
> 	I saw that setof takes a type or table as an argument. What if what
> i want to return is not in a table schema, can i do something like "setof
> (blah inet, blah2 varchar(256))"?

You might want to read the Set Returning Functions document on techdocs:
http://techdocs.postgresql.org/guides/SetReturningFunctions

The best answer is to define a row type for it with CREATE TYPE, but you
can also return setof record and rely on the user putting the type
information in the select.

В списке pgsql-general по дате отправления
От: scott.marlowe
Дата:
Сообщение: Re: 7.4?
От: scott.marlowe
Дата:
FAQ