On Sat, Oct 19, 2024, at 03:32, Michael Paquier wrote: > If this area of the code is refactored so as a different error is > triggered for these two specific queries, we'd still be alerted that > something is wrong the same way for HEAD or what you are suggesting. > I can see your argument, but it does not really matter because the > errors triggered by these option combinations don't link specifically > to COPY TO or COPY FROM. At the end, I'm OK with leaving things the > way they are on HEAD, and let that be.
OK, I understand your point of view, and agree there is no problem from a safety perspective, as the tests would still alert us, just with a suboptimal error message. I can see how such a small change might not be worth doing in a single commit. However, since my last email, I've found some other problems in this area, and think we should do a more ambitious improvement, by rearranging the incorrect options tests into three categories: 1. incorrect COPY {FROM|TO} options 2. incorrect COPY FROM options 3. incorrect COPY TO options Also, I've found two new problems: 1. Incorrect options tests are missing for the QUOTE and ESCPAE options. This was discovered by Jian He in a different thread. 2. One of the ON_ERROR incorrect options tests also depend on the order of checks in ProcessCopyOptions. To explain my current focus on the COPY tests, it's because we're currently working on the new raw format for COPY, and it would be nice to cleanup these tests as a preparatory step first. New patch attached. /Joel
0001-Improve-incorrect-COPY-options-tests.patch
Description: Binary data