| From: | solai v <solai(dot)cdac(at)gmail(dot)com> |
|---|---|
| To: | jian he <jian(dot)universality(at)gmail(dot)com> |
| Cc: | Álvaro Herrera <alvherre(at)kurilemu(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: NOT NULL NOT ENFORCED |
| Date: | 2026-09-28 04:34:00 |
| Message-ID: | CAF0whuc--DUH=J7aCpbC77id1Vq1CyFbK_xe4qPr8GAVRKuh8g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexandre Felipe | 2026-09-28 04:45:55 | Re: aio: worker: Free SMGR objects when idle |
| Previous Message | Jelte Fennema-Nio | 2026-09-28 03:42:04 | Re: pgindent to ignore build directories |