From: André Toscano <andre.toscano@uol.com.br>
To: pgsql-sql@postgresql.org
Subject: Functions return a select in a table, which data type I must use? (Brazilian User)
Date: Sun, 21 Nov 2004 20:07:48 -0300
Message-ID: <41A11FC4.4040909@uol.com.br> (raw)
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)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: andre.toscano@uol.com.br
Subject: Re: Functions return a select in a table, which data type I must use? (Brazilian User)
In-Reply-To: <41A11FC4.4040909@uol.com.br>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox