model-writtenrun 7387 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Charles Samborski reported that repeatedly executing a prepared CREATE DOMAIN statement with a CHECK expression produced varying unrecognized-node errors, and supplied a C reproducer in #1.
- Tom Lane traced the failure to transformExpr modifying a cached NullTest node, identified equivalent DEFAULT-expression bugs, and attached protective copies for three domain-processing paths in #2; he also suggested centralizing copying to prevent similar omissions.
- The broader solution was developed in thread #44404 and landed for HEAD as 7c337b6b52, moving protective copying into ProcessUtility and adding an argument indicating whether the input tree must remain unchanged.
- The narrow patch from #2 landed unchanged apart from branch context as 1a3d30255a for stable branches, because the broader fix changed ProcessUtility's API and could not be backpatched.
- Charles Samborski asked whether the fix had shipped in #3, and Tom Lane confirmed in #4 that it was included in the releases made earlier that August; no patch work remained pending in this thread.