model-writtenrun 8851 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Geoghegan opened the thread by proposing an opclass-level declaration that equality preserves all observable information, allowing B-tree deduplication while excluding cases such as numeric display-scale differences and nondeterministic collations #1.
- Tom Lane supported exposing this property directly through opclasses for planner use, while Antonin Houska identified aggregate push-down as another consumer and argued for terminology independent of deduplication #2 #5 #8.
- Peter identified name indexes' cstring storage as a special case and proposed defining the property through datum_image_eq(), which accounts for TOAST representation differences #6 #7.
- Anastasia Lubennikova posted a Boolean catalog flag defaulting to true, but Antonin warned that existing extension opclasses could become unsafe after dump and restore; her revision switched to explicit opt-in, added pg_dump support, and supplied extension declarations #9 #10 #12.
- On November 12, Peter committed cstring support for datum_image_eq() as preparation for comparing name index values, without a matching attachment in this thread 8c951687f5.
- Later that day, Peter committed the switch to datum_image_eq() in _bt_keep_natts_fast(), making its comparisons insensitive to TOAST input differences and preparing it for deduplication 1f55ebae27.
- Peter questioned broader access-method markings and mutable opclass semantics, and Anastasia's next revision added catalog documentation and removed the premature catalog-version bump #13 #14.
- Antonin then found unsafe positive flags for arrays, records and geometric types; Anastasia restricted registrations to conservatively selected B-tree opclasses and split those registrations from the infrastructure patch #15 #18.
- Robert Haas noted implementation obstacles to substantive ALTER OPERATOR CLASS changes, while Peter treated a nondisruptive upgrade path as optional and emphasized that changing an opclass's underlying semantics could invalidate existing indexes #16 #17.
- Alvaro Herrera objected to the BITWISE terminology, and discussion of conditional safety led Robert to propose an optional support function instead of a Boolean or three-state flag, an approach Peter endorsed #19 #21 #24 #25.
- Peter formalized safety using datum_image_eq() and explained why datumIsEqual() was insufficient: equal values must remain interchangeable despite differing TOAST input states #26 #27 #28.
- Anastasia supplied a support-function prototype with new SUPPORT syntax and a pg_opclass function reference; Peter redirected it toward ordinary B-tree support function 4, avoiding new grammar and custom dump support while adopting image-equality terminology #30 #31.
- Peter took on implementation with Anastasia's help, using opclass input types and collations, while leaving polymorphic container support conservative and asking whether cross-type support functions should remain prohibited #32.
- At the final message, Peter had moved the infrastructure into the broader deduplication series as a separate patch and was still requesting expert review of its suitability for future planner consumers #33.
- The infrastructure subsequently landed as a substantial rework of Anastasia's support-function prototype, with generic and collation-aware equalimage routines, support-function validation, catalog registrations and tests; the original catalog flag and custom grammar were superseded, and generic container opclasses remained unsupported #30 612a1ab767.