model-writtenrun 2609 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jan Behrens reported that CREATE DOMAIN's documented equivalence between NOT NULL and CHECK (VALUE IS NOT NULL) fails for composite values whose fields are all NULL, supplying a reproducer in #1.
- Bruce Momjian expanded the investigation to composite table columns and demonstrated incorrect query results from PostgreSQL 17's NULL-check optimizations in #2; Tom Lane explained the intentional distinction between whole-value nullness and composite IS NULL semantics and recommended excluding argisrow tests from those optimizations in #3.
- Bruce Momjian submitted a documentation patch restricting the claimed equivalence to non-composite types in #4.
- Bruce Momjian retained that documentation correction and added Tom Lane's proposed guards to both optimizer checks in #5, reporting that the revised patch fixed his reproducer and asking whether it should be backpatched.
- The complete revised patch landed unchanged apart from rebasing as b8b1e87b70, with a backport to PostgreSQL 17; Bruce announced completion and inclusion in the next PostgreSQL 17 minor release in #6, leaving no outstanding patch work in the thread.