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)
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend