> Thanks for the report and the fix.
Yup. I have added it to the 2016-11 commitfest:
https://commitfest.postgresql.org/11/794/
> This seems a rather basic error to occur a year after release.
>
> Is this a problem with the testing of RLS? What other RLS related
> failures exist in other commands?
I think was simply due to a small gap in the test suite.
> Perhaps we should extend rowsecurity test with a more comprehensive
> set of tests rather than just fix the COPY one?
I think more tests that provide value are always a *good* thing,
however, would argue that other tests 'unrelated' to this fix are more
of a TODO item than something to include with this fix. Though, I am
certainly willing to attempt to find/add more test cases around this
specific functionality if that is desired.
-Adam