Hi
I tested the v5 patch on a fresh cluster and verified the following cases:
- NOT NULL NOT ENFORCED constraint creation and catalog state
- NULL insertion with NOT ENFORCED constraints
- ALTER CONSTRAINT and VALIDATE CONSTRAINT behavior
- Duplicate NOT NULL constraint handling
- NOT VALID, ENFORCED and NOT ENFORCED combinations
- NO INHERIT behavior
- Inheritance and multiple inheritance cases
- CREATE TABLE LIKE INCLUDING CONSTRAINTS
- Partitioned table and partition constraint behavior
- pg_dump preservation of NOT NULL NOT ENFORCED constraints
Some of the test results were:
- Created a NOT NULL NOT ENFORCED constraint successfully and verified
that it was stored as not enforced and not validated.
- Successfully inserted a NULL value into a column having a NOT NULL
NOT ENFORCED constraint.
- Verified that attempting to change the constraint to ENFORCED or
validate it resulted in the expected errors.- Verified that duplicate
NOT NULL constraints on the same column were handled as expected.
- Tested inheritance cases with both enforced and not-enforced NOT
NULL constraints. The resulting child constraints and attnotnull state
were as expected.
- Verified that CREATE TABLE ... LIKE INCLUDING CONSTRAINTS preserved
the NOT ENFORCED state, and NULL insertion into the copied table was
allowed.
- Tested partitioned table cases with NOT ENFORCED constraints and
verified that the constraint state was preserved correctly.
- Verified that pg_dump preserved the NOT NULL NOT ENFORCED definition
in the generated dump.
I also ran the complete regression test suite successfully. All tests passed.
Based on the above testing, the tested cases behaved as expected with
the v5 patch.
Regards,
Solai