No title

Started by rwellalmost 25 years ago2 messagesgeneral
Jump to latest
#1rwell
rwell@sinaman.com

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: rwell (#1)
Re:

"=?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