Kaarel <krl(at)klaabu(dot)com> writes:
> Then I tried to use this:
> v_result v_data%TYPE
> where v_data is an argument of the same function with anyelement
> datatype, but no luck.
Define "no luck". What did you do *exactly*, and what happened?
regards, tom lane