Hi hackers, Here is a patch that fixes a minor problem in copy.c's ProcessCopyOptions, as well as fixing thinko in its tests, as well as adding new tests for the bugfix.
[PATCH 1/2] Fix thinko in tests for COPY options force_not_null and force_null. Use COPY FROM for the negative tests that check that FORMAT text cannot be used for these options, since if testing COPY TO, which is invalid for these two options, we're testing two invalid options at the same time, which doesn't seem intentional, since the other tests seems to be testing invalid options one by one. In passing, consistently use "stdin" for COPY FROM and "stdout" for COPY TO, even though it has no effect on the tests per se, it seems better to be consistent, to avoid confusion. [PATCH 2/2] Fix validation of FORCE_NOT_NULL/FORCE_NULL for all-columns case. Add missing checks for FORCE_NOT_NULL and FORCE_NULL when applied to all columns via "*". These options now correctly require CSV mode and are disallowed in COPY TO as appropriate. Adjusted regression tests to verify correct behavior for the all-columns case. /Joel
0001-Fix-thinko-in-tests-for-COPY-options-force_not_null-.patch
Description: Binary data
0002-Fix-validation-of-FORCE_NOT_NULL-FORCE_NULL-for-all-.patch
Description: Binary data