Functions return a select in a table, which data type I must use? (Brazilian User) - Mailing list pgsql-sql

From André Toscano
Subject Functions return a select in a table, which data type I must use? (Brazilian User)
Date
Msg-id 41A11FC4.4040909@uol.com.br
Whole thread Raw
Responses Re: Functions return a select in a table, which data type I
List 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 by date:

Previous
From: Dmitry Tkach
Date:
Subject: Trouble with explicit joins
Next
From: Tom Lane
Date:
Subject: Re: Trouble with explicit joins