<slapo(at)centrum(dot)sk> writes:
> It's my second function in pg/plsql I've created and I don't really know why there are no results being returned in 7.4.8.
RETURN QUERY doesn't exist in 7.4, and unfortunately the syntax checking
in that ancient version isn't very tight. In a function returning set,
it just ignores anything after RETURN unless it's RETURN NEXT. So it
just sees a RETURN command telling it to exit.
regards, tom lane