Oleg Lebedev <oleg.lebedev@waterford.org> writes:
> EXIT WHEN rec.indkey[i] IS NULL;
You'll need to drop out of the loop on either zero or null, I think.
> RAISE NOTICE ''uind col: %'', rec.indkey[i];
IIRC, the RAISE statement is very very restrictive about what it will
take. The syntax error is probably coming from here.
regards, tom lane