Is it possible in PostgreSQL to write a function that would return a record type. What I need is something like this: create function my_func(varchar) return record as ' declare my_rec record; begin select null as field1, null as field2 into my_rec; .... some processing to populate the actual values of the record return my_rec; end; ' LANGUAGE 'plpgsql'; I get the following when I try to compile this: NOTICE: ProcedureCreate: return type 'record' is only a shell and following when I try to execute it (even though I am not sure how to execute this at all); ERROR: fmgr_info: function 0: cache lookup failed Please help. Thanks a lot in advance Alla ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster