On Thu, 19 Mar 2026 at 03:26, Ilia Evdokimov <[email protected]> wrote: > After the new test was committed, I realized that v8 tests relies on > selectivity calculation, which are not guaranteed to remain stable over time > and way vary depending on planner heuristics or platform differences. > Therefore, it seems better to remove tests from v8. > > Instead, we can test the invariant behavior: when NULL is present in a <> ALL > clause, the selectivity is always 0.0. > > The v9-patch adds three test cases: a degenerate case with only NULL, NULL > combined with constants, NULL combined with both constants and non-constant > expression. > > Thoughts?
I've now pushed the main patch. I did end up removing the first test of the v9 tests since it was exercising the same code path as the 2nd test. I also didn't see the need to execute the query, so I changed it to run EXPLAIN without ANALYZE. For the main patch, I only adjusted the comments a little. I wanted to make reference to var_eq_const() as the short-circuit really is trying to follow what that function would have done if the short-circuit path hadn't been taken. I also added comments in the tests to explain what we are expecting to see. I am probably in a minority of people who do this. I find it's important to understand that when it comes to updating the expected results of existing tests. I expect we have plenty of tests that no longer test what the original test was meant to test as a result of people not doing this. David
