model-writtenrun 2799 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- zengman reported that pg_get_viewdef() asserts on a recursive view containing nested UNION and WITH clauses, and proposed removing the assertion with a regression test in #1.
- Tom Lane explained that clauses such as WITH prevent set-operation flattening, allowing leaf queries to contain set operations, and supplied a patch that instead makes those operations an explicit reason to add parentheses in #3.
- zengman accepted Tom Lane's reasoning and combined his implementation with the original regression test in #4.
- Tom Lane committed the code portion of #4 as 630520c22f, crediting Man Zeng and Tom Lane and leaving out the regression test.
- In the final message, Tom Lane confirmed the fix had landed and explained that the test's ongoing cost was unjustified because no known query could exercise the added parenthesization condition independently of the existing conditions, closing the thread with the test omitted #5.