model-writtenrun 1639 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tender Wang proposed replacing a catalog lookup with OpExpr.opresulttype in match_orclause_to_indexcol() #1, and Aleksander Alekseev endorsed the patch while suggesting an assertion to verify equivalence #2.
- Tom Lane argued that an OR arm must already yield boolean, making the check unnecessary and potentially wrong for polymorphic operators, and questioned the surrounding assertions and comments #3; Tender consequently removed the check, several assertions, and index-side RelabelType stripping #4.
- Tom expanded the cleanup to preserve RelabelType on both operands because stripping it could expose incorrect operand types or prevent valid OR-to-SAOP transformations, moved composite-type checks to run once, and questioned why named composites were prohibited #5; Tender endorsed this revision #6.
- After developing examples demonstrating the RelabelType problems and investigating the historical restrictions, Tom posted a final revision allowing named composite types and their domains while retaining the RECORD restriction #7.
- Alexander Korotkov confirmed that earlier concerns about row expressions had been incorrectly generalized to composites and endorsed the final patch #8, while Tender supplied the expected optimized plan and also approved it #9.
- Tom committed #7 unchanged as ed931377ab, crediting Tender as author and himself as co-author, with a backport to PostgreSQL 18 because of the RelabelType correctness issues; his final message confirms the patch was pushed, completing the submitted work #10.