Problem with returning setof record - Mailing list pgsql-sql

From oliverp21@free.fr
Subject Problem with returning setof record
Date
Msg-id 1094577194.413dec2a05bc4@imp1-q.free.fr
Whole thread Raw
Responses Re: Problem with returning setof record
List pgsql-sql
Hello,

Here is a simple function I created for a test.

create function ttt() returns setof record as '
declare
r record;
begin
for r in select * from utilisateurs.menus loop  return next r;
end loop;
return;
end;
' language 'plpgsql';

When I try to use it, it returns to me :

select ttt();set-valued function called in context that cannot accept a set
:  PL/pgSQL function "ttt" line 5 at return next

Anyone has an idea ?

Best regards,
Patrice OLIVER


pgsql-sql by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: Re: Problem with LATIN1 characters from Perl-DBI
Next
From: Richard Huxton
Date:
Subject: Re: Problem with returning setof record