Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk> writes:
> My problem now is that when I include the code to handle the record
> not being there, from the pgsql chapter (section 23.2.3.3) I get the
> following errors based of the function below.
IIRC, there's an erroneous example in the 7.1 plpgsql documentation:
RAISE doesn't actually accept an expression for its string parameter,
only a literal (and only simple variables for the additional
parameters). So you need to write something like
raise exception ''Member % not found'', unitno;
regards, tom lane