model-writtenrun 1524 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- jian he reported that CREATE STATISTICS on a table function misleadingly complained about multiple relations, and also identified duplicate checking in ProcessUtilitySlow and CreateStatistics #1.
- Kirill Reshke argued for more precise terminology and an unsupported-query-result diagnostic, while Alvaro Herrera and jian he explored wording that listed supported table types #2 #5 #6 #9.
- The terminology discussion exposed ambiguity in the glossary's definition of relation; Richard Guo questioned its wording, and Tom Lane proposed defining the mathematical meaning before PostgreSQL's object-specific meaning #7 #8 #11.
- Alvaro committed Tom's inline glossary rewrite as 16a9165ce4, substituting the defined term SQL object and the full product name, then announced those edits in #12; Tom's approval in #13 came after the commit.
- Alvaro separated a backpatchable diagnostic fix from a development-only refactor that would pass resolved relation OIDs into CreateStatistics, noting that repeated name resolution was undesirable and regression coverage was missing #14.
- Tom accepted the diagnostic with a shorter list of supported relation types, questioned redundant locking, and suggested moving parse analysis into CreateStatistics; jian implemented that alternative and added tests #15 #16.
- Alvaro landed only the diagnostic portion as b830f9d674, with revised wording and unsupported-target tests, and announced it in #17; jian subsequently retained the outstanding refactor without the test additions in #18.
- Peter Eisentraut explained that the revised diagnostic still described relation kinds even though the check actually rejected FROM-clause constructs other than relation names, and supplied a focused correction #19 #20.
- Tom approved Peter's wording but argued that deliberately reserved syntax should retain the feature-not-supported SQLSTATE; Peter incorporated that adjustment into 9ec0b29976 and confirmed completion #21 #22.
- jian resumed the remaining refactor with a rebase, after which Alvaro extended it to pass an open Relation into transformStatsStmt and eliminate separate transformation during ALTER TABLE rebuilding; Alvaro also raised whether transformation should copy the parser node before modifying it #23 #24.
- Discussion of preserving resolved relation identity led jian to demonstrate that the revised ALTER TABLE path lost an error-position display; Alvaro considered that display misleading and proposed a separate error-context improvement rather than blocking this refactor #25 #26 #27 #28.
- jian then substantially redesigned the patch to retain both the raw FROM clause and a transformed range table, propagating resolved OIDs to avoid repeated name lookup, and stated that much of the implementation came from another discussion #29.
- Alvaro questioned how rebuilding would support statistics spanning multiple relations; jian argued that the statistics catalog would need to retain every participating relation OID and later posted a rebased, polished version using the same range-table design #30 #31 #32.
- At the thread's last message, Alvaro remained unconvinced and suggested separate parser and post-transformation node types, leaving the broader refactor unresolved after the glossary update and both diagnostic fixes had landed #33.