I have a function that does a select like this:
SELECT a.nome, b.email into nome, email FROM tabela1 a
INNER JOIN tabela2 b ON b.fk = a.fk
Is there any way to create a "temporary table" that I can temporarily store the various possible returns of that function and use them inside a loop like the following?
LOOP
--faz alguma coisa as variáveis nome e email
END LOOP
Edit - problem solved, solution in answers