On Fri, 26 Jan 2024 at 19:03, Richard Guo <guofenglinux@gmail.com> wrote:
> At first I wondered if we should assume that the same param expr must
> have the same equality operator. If not, we should also check the
> operator to tell if the cache key is a duplicate, like
>
> - if (!list_member(*param_exprs, expr))
> + if (!list_member(*param_exprs, expr) ||
> + !list_member_oid(*operators, hasheqoperator))
hmm, if that were the case you wouldn't do it that way. You'd need to
forboth() and look for an item in both lists matching the search.
> But after looking at how rinfo->left_hasheqoperator/right_hasheqoperator
> is set, it seems we can assume that: the operator is from the type cache
> entry which is fetched according to the expr datatype.
Yip.
> So I think the patch makes sense. +1.
Thanks for reviewing. I've pushed the patch.
David