PLPGSQL func. defn. for returning resultset?

Поиск
Список
Период
Сортировка
От Otis Gospodnetic
Тема PLPGSQL func. defn. for returning resultset?
Дата
Msg-id 3C794AAE.3080405@ivillage.com
обсуждение исходный текст
Ответы Re: PLPGSQL func. defn. for returning resultset?  (Roberto Mello <rmello@cc.usu.edu>)
Re: PLPGSQL func. defn. for returning resultset?  (Jan Wieck <janwieck@yahoo.com>)
Список pgsql-sql
Hello,

I need to write some functions/stored procedures in PLPGSQL.
All examples have a return clause that returns a single item (e.g. 
RETURN INTEGER or RETURN VARCHAR, etc.).

However, I need to return a result set (e.g. SELECT user_id, name FROM 
users).  What do I specify in the return part of the FUNCTION definition 
for that?
CREATE FUNCTION foo() RETURNS ????? AS ' .....
What do I put in place of ?????

I could not find any examples for such cases.

Thanks,
Otis



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

Предыдущее
От: Masaru Sugawara
Дата:
Сообщение: Re: Matching columns in rows from two tables
Следующее
От: "Jon Obuchowski"
Дата:
Сообщение: returning a record from a function?