Search Postgresql Archives

"The tuple structure of a not-yet-assigned record is indeterminate."

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In my function I have (kept the important part)

CREATE OR REPLACE FUNCTION foo() RETURNS SETOF RECORD AS $$
DECLARE
	retval RECORD;
BEGIN
     some loop
           retval.jd := tmp.id;
           retval.d2 := _c2;
           retval.d3 := _c3;
           RETURN NEXT retval;
    end loop
return;
END;

and I get

ERROR:  record "retval" is not assigned yet
DETAIL:  The tuple structure of a not-yet-assigned record is indeterminate.
CONTEXT:  PL/pgSQL function "foo" line 33 at assignment

It seems that the line with   retval.jd := tmp.id;  is where it stops.
Any suggestion on how to fix this error?


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux