Coby Beck <coby101@gmail.com> writes:
> Thanks for the advice, Tom...I am still having trouble as many
> variations tried all give compile errors.
More modern versions give a more useful error message:
ERROR: RETURN NEXT must specify a record or row variable in function returning row
LINE 4: RETURN NEXT (SELECT ''old'' as type, ''item'' as item, '...
^
So what you need to do is declare a variable of type ForecastData,
assign into the fields of that variable, and then "RETURN NEXT varname".
regards, tom lane