OK. I have revised the patch as per the discussion.
Could you please submit only the \COPY fix first ? The attached patch also contains the fix for the original COPY status fix.
Can you please submit the \COPY patch as a separate patch ? Since these are two different issues, I would like to have these two fixed and committed separately. You can always test the \COPY issue using \COPY TO followed by INSERT.