model-writtenrun 3992 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Dean Rasheed proposed making FROM-subquery aliases optional by leaving the explicit alias unset and hiding the internal relation name from name resolution, while retaining standard-compliant aliases in deparsed SQL #1.
- Julien Rouhaud demonstrated generated aliases displacing user-written names and questioned portability, while Isaac Morland defended eliminating unnecessary names; Dean explained that deparsing already renamed aliases when needed #2 #3 #4 #7 #8.
- David G. Johnston suggested visibly distinguishing generated names with a pg_ prefix, and Dean preferred unnamed_subquery to avoid confusion with system catalogs and follow the unnamed_join precedent #5 #6.
- Tom Lane questioned alias representation and VALUES coverage and requested simpler documentation; Dean explained that both cases already used null explicit aliases and separated a pre-existing locking bug into another thread #9 #10.
- Dean's revised patch simplified the documentation, adopted unnamed_subquery, and corrected named locking-clause matching with regression tests; Zhihong Yu suggested moving an assignment but withdrew the concern after Dean explained the additional branches that would require #11 #12 #13 #14.
- Tom approved the revision #15, and Dean committed #11 unchanged apart from diff presentation and base offsets as bcedd8f5fc.
- More than a year later, Erwin Brandstetter reported misleading errors exposing the invisible unnamed_subquery identifier, and Tom suggested using an empty internal name and assigning a printable name during deparsing #16 #17.
- Dean showed that unnamed joins and VALUES had the same diagnostic problem and proposed filtering unreferenceable entries in searchRangeTableForRel(), avoiding broader naming changes that could affect EXPLAIN output #18.
- The optional-alias feature had landed, but the diagnostic follow-up remained under discussion at the thread's end: Tom supported cleaning it up while questioning whether existing alias and entry-kind fields were sufficient or a new flag was needed #19.