"The current implementation of RETURN NEXT for PL/pgSQL stores the entire result set before returning from the function"
I thought I read somewhere that 8.x did not do this.
Thanks,
Tony