Thread:

From
"rwell"
Date:
How can I return RECORD in my function as I get this msg

ERROR:  fmgr_info: function 0: cache lookup failed

my function was delcared like this:

create function testfunction() returns record as '
declare
result record;
begin
select into result * from test;
return record;
end;
' language 'plpgsql'
Thx
==================================================================
新浪免費電子信箱  http://sinamail.sina.com.hk




Re:

From
Tom Lane
Date:
"=?big5?B?cndlbGw=?=" <rwell@sinaman.com> writes:
> How can I return RECORD in my function as I get this msg

You can't.  The return type of the function has to be declared as
a real datatype (say, the row datatype of the table in question).
"RECORD" is just a convenient placeholder within plpgsql.

            regards, tom lane