model-writtenrun 6114 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- shihao zhong opened the thread with five reproduced problems and patches covering ON CONFLICT inference, MERGE source nullability, COALESCE typmod/collation preservation, virtual generated-column nullability, and duplicate grouping expressions; he described the grouping patch as a workaround and outlined broader alternatives #1.
- Melanie Plageman questioned tracking five problems as one open item, and shihao agreed they should be tracked separately #2 #3.
- jian he reviewed the ON CONFLICT patch, suggested comment and attribute-number cleanup, and otherwise found it good #4.
- Richard Guo committed the ON CONFLICT portion of #1 with naming, defensive-check, and regression-test edits as 62e46c00c6, then confirmed the landing in #5.
- Richard expanded the COALESCE portion of #1 to preserve metadata when CASE and NULLIF also reduce to an input, committing the coauthored fix as d8ce0050a6; he limited backpatching to PostgreSQL 19 because older cases lacked field reports and the fix changes exposed typmods #5.
- Richard committed the virtual-generated-column portion of #1 with comment and test revisions as d8444163d2, while warning that allowing partition generation expressions to differ from their parent's undermines NOT NULL and CHECK guarantees when reading through the parent #5.
- Richard considered the MERGE and grouping problems older bugs rather than PostgreSQL 19 open items and referred MERGE to Dean Rasheed #5; Haibo Yan then showed that the grouping workaround evaluates volatile expressions too early and misses argument-free set-returning functions, while remaining independent of his separate grouping-identity fix #6.
- Fujii Masao reproduced an ON CONFLICT failure introduced by d8ce0050a6 #7, and Richard supplied a new patch preserving original typmods when CASE or COALESCE is only partially reduced or COALESCE becomes an all-null constant, explaining that index expressions undergo two simplification passes while inference expressions undergo one #8.
- Fujii found a remaining NULLIF failure with the follow-up patch #9, and shihao supplied a delta using the simplified first argument's typmod; in the same reply, shihao withdrew the grouping workaround after reproducing Haibo's regression and maintained that MERGE's newly wrong results still warranted PostgreSQL 19 tracking #10.
- Dean said personal circumstances would delay his attention to MERGE until the following week, leaving that fix pending #11.
- Richard revised his follow-up to preserve the original typmod of rebuilt and constant-folded NULLIF expressions, superseding shihao's alternative strategy, and added a second patch that looks through RelabelType to restore FULL JOIN USING predicate pushdown #12.
- Manu reported broad differential testing that validated the revised ON CONFLICT fixes and FULL JOIN pushdown, but identified another inference mismatch involving immutable-function constant evaluation; he proposed ignoring typmod-only decorations during comparison without attaching that change #13.
- shihao then demonstrated that the revised relabeling also prevents partition pruning and attached a delta stripping relabeling from partition keys #14.
- Dean committed the MERGE portion of #1 as cf44f3fa19, retaining its logic with cosmetic adjustments and expanding tests to cover both wrong results and wrong-varnullingrels errors; he backpatched through PostgreSQL 17 and confirmed the landing in #15.
- At the thread's end, four initial fixes had landed, including MERGE, while the typmod follow-up and its FULL JOIN and pruning repairs remained uncommitted in the supplied record, the grouping workaround was withdrawn, and Manu's additional inference case remained unresolved #5 #10 #12 #13 #14 #15.