On Thu, May 2, 2024 at 3:57 PM Yuya Watari <watari.y...@gmail.com> wrote: >
hi. sorry to bother you, maybe a dumb question. trying to understand something under the hood. currently I only applied v24-0001-Speed-up-searches-for-child-EquivalenceMembers.patch. on v24-0001: +/* + * add_eq_member - build a new EquivalenceMember and add it to an EC + */ +static EquivalenceMember * +add_eq_member(EquivalenceClass *ec, Expr *expr, Relids relids, + JoinDomain *jdomain, Oid datatype) +{ + EquivalenceMember *em = make_eq_member(ec, expr, relids, jdomain, + NULL, datatype); + + ec->ec_members = lappend(ec->ec_members, em); + return em; +} + this part seems so weird to me. add_eq_member function was added very very long ago, why do we create a function with the same function name? also I didn't see deletion of original add_eq_member function (https://git.postgresql.org/cgit/postgresql.git/tree/src/backend/optimizer/path/equivclass.c#n516) in v24-0001. Obviously, now I cannot compile it correctly. What am I missing?