model-writtenrun 3687 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Kim Johan Andersson proposed support functions to improve containment selectivity estimates and enable B-tree index access by rewriting constant-range containment into scalar inequalities, initially implementing both simplification and index-condition requests #1.
- Laurenz Albe reported successful build and regression testing, questioned the unused index-condition path, and demonstrated incorrect operator selection and a collation error for a custom text range #3 #4.
- Laurenz suggested extending the optimization to stable range expressions, while Kim agreed to remove the redundant index-condition path; support for nonconstant ranges remained unimplemented, and the patch was returned with feedback #5 #6 #7.
- Jian He revived the work by removing the unused path, fixing comparison collation, and simplifying tests; after Laurenz showed that custom operator classes still selected the wrong operators, Jian changed the lookup to use the range's declared subtype operator class #8 #9 #10.
- Laurenz tested the corrected patch and supplied simpler support-function dispatch, code cleanup, smaller regression cases, and a text_pattern_ops test; he retained Kim and Jian as authors, and Jian subsequently fixed a missing-return compiler warning #11 #12 #14.
- Tom Lane added safeguards against evaluating volatile or expensive element expressions twice, cached the range operator family, and proposed replacing date-table tests with direct expression-plan checks #15.
- Jian supported the revised tests while requesting retention of the custom operator-class case, and Tom committed 075df6b208 from #15 with lighter date tests, additional volatility coverage, and the small text-range test retained #16 #17.
- The thread ended with Vignesh marking the commitfest entry committed; the constant-range optimization had landed, with no further patch pending in the thread #18.