Functions return a select in a table, which data type I must use? (Brazilian User)

Поиск
Список
Период
Сортировка
От André Toscano
Тема Functions return a select in a table, which data type I must use? (Brazilian User)
Дата
Msg-id 41A11FC4.4040909@uol.com.br
обсуждение исходный текст
Ответы Re: Functions return a select in a table, which data type I
Список pgsql-sql
Hello, friends.

If anybody can help, how can I do a FUNCTION return a result from a 
SELECT in a table in PostgreSQL?
My Problem is the RETURN TYPE from a FUNCTION, I don´t know what I have 
to use to return the data as a select result.

Example:
----------------

DROP FUNCTION ACADEMICO.teste(int4);

CREATE FUNCTION ACADEMICO.teste(int4)
RETURNS ?????
AS
'   select cod_aluno, nome, cpf from ACADEMICO.TB_alunos

'
LANGUAGE 'SQL';
----------------------------------

Thanks in Advance


André Toscano
(Brazilian user)



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

Предыдущее
От: Dmitry Tkach
Дата:
Сообщение: Trouble with explicit joins
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Trouble with explicit joins