model-writtenrun 3062 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut reported that a binary-coercible cast to a range over a domain could bypass the domain's constraints, and asked whether deeper nesting also needed consideration #1.
- Tom Lane argued that all binary-coercible casts involving range types should be rejected because ranges embed their own type OIDs, just as already-rejected composite and array types do #2.
- Tom attached a patch rejecting casts involving ranges and multiranges, omitted regression tests because adjacent checks lacked coverage, and proposed limiting the change to PostgreSQL 17 and later to avoid disrupting existing users in minor releases #3.
- Peter endorsed both the patch and the proposed version scope #4, while Richard Guo approved the patch and suggested matching the type ordering in the comment to the checks #5.
- Tom explained that enums differ from container types and considered reordering the code to match the comment instead #6.
- The patch landed as 2366ab246a with light comment edits and reordered checks, preserving the rejection logic from #3; it was also backpatched to PostgreSQL 17, with older branches deliberately left unchanged.