On Fri, 9 Apr 2021 at 00:00, David Rowley <dgrowle...@gmail.com> wrote: > I push this with some minor cleanup from the v6 patch I posted earlier.
I realised when working on something unrelated last night that we can also do hash lookups for NOT IN too. We'd just need to check if the operator's negator operator is hashable. No new fields would need to be added to ScalarArrayOpExpr. We'd just set the hashfuncid to the correct value and then set the opfuncid to the negator function. In the executor, we'd know to check if the value is in the table or not in the table based on the useOr value. I'm not really sure whether lack of NOT IN support is going to be a source of bug reports for PG14 or not. If it was, then it might be worth doing something about that for PG14. Otherwise, we can just leave it for future work for PG15 and beyond. I personally don't have any strong feelings either way, but I'm leaning towards just writing a patch and thinking of pushing it sometime after we branch for PG15. I've included the RMT, just in case they want to voice an opinion on that. David