Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> writes:
> So is the problem down to the OP defining a function not a procedure and
> therefore not being able to use CALL to get at the OUT parameters?
Yeah. I was thinking that plpgsql's version of CALL was more
forgiving of that, but I was wrong: it too wants the target to be
declared as a procedure.
regards, tom lane