Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:> COPY in plpgsql are not allowed.
I think it will work if you use an EXECUTE.
regards, tom lane