model-writtenrun 9824 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jürgen Strobel reported that partition-local defaults were ignored when inserting through the parent and that specifying a local default could also lose an inherited NOT NULL constraint #1.
- Amit Langote supplied branch-specific fixes for the NOT NULL violation while explaining that applying partition defaults after tuple routing required separate work #2; Dmitry Dolgov and Jürgen argued that partition defaults should take precedence, particularly for per-partition sequences #4 #6.
- Ashutosh Bapat tested the first patch and questioned its Boolean merging and constraint handling #9, then reviewed its comments and default handling #11; Amit's revisions preserved inherited defaults unless explicitly overridden and strengthened regression coverage #10 #12.
- After the summer revisions, Alvaro Herrera rewrote MergeAttributes to scan partition-local definitions against inherited columns, reuse duplicate-column checking, and eliminate reliance on is_from_parent #13; Amit reviewed the rewrite before Alvaro posted a polished version for commitment #14 #16.
- Alvaro discovered that partition COLLATE clauses were silently ignored #15, and Amit supplied a separate patch on top of the rewrite to reject mismatches consistently with inheritance and ATTACH PARTITION #17.
- Alvaro deferred the collation behavior change because it could break existing applications, briefly considering warnings on stable branches instead #18 #20.
- Alvaro committed the attribute-handling rewrite from #16 together with expanded tests derived from #17 as 705d433fd5, backpatching the fix while leaving collation behavior unchanged #21.
- Discussion then returned to partition defaults: Jürgen wanted consistent insertion behavior and per-partition sequences, while Alvaro identified problems with expanding defaults before routing and knowing which values to replace afterward #26 #27.
- Tom Lane defended using defaults from the table named in INSERT, citing updatable views, rerouting problems, and compatibility constraints #32; Amit highlighted possible routing loops and suggested documenting the existing behavior #33 #35.
- Jürgen, Alvaro, and Tomas Vondra continued arguing that direct partition insertion should behave like an optimization of parent insertion, but no replacement default-processing design or patch was completed #36 #37 #43.
- The thread ended with Amit reposting the remaining collation check for HEAD and asking whether stable branches should remain unchanged; the inheritance fix had landed, while collation enforcement and changes to routed default evaluation remained unresolved #44.