model-writtenrun 7277 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Vignesh C reported that pg_dump and pg_get_function_sqlbody emitted a SQL function referencing t1_1 without declaring that alias, and traced the renaming to set_rtable_names() in #1; Jonathan S. Katz explained that the original failure arose while testing DDL replication in #2.
- Tom Lane argued that choosing distinct aliases was valid and identified the missing alias output in the DML target printers as the likely defect in #3; Jonathan supplied the original DELETE example in #4 and confirmed an UPDATE reproduction in #5.
- Tom demonstrated that INSERT was also affected and posted #6, extracting the existing alias-printing logic into get_rte_alias() for all three DML commands and adding a combined regression test; he left sibling WITH-query alias disambiguation unchanged because changing it would require a larger, riskier patch.
- Jonathan tested the patch successfully and approved the code in #7, agreeing that correct disambiguation mattered more than the appearance of generated aliases and supporting backpatching.
- Tom noted that conflicting table names could require aliases even when users supplied none, identified possible rule dump/restore failures, and undertook backpatching in the final message #8; 393430f575 subsequently landed #6 unchanged, with backports to all supported branches.