On Fri, 3 Jul 2026 at 21:10, John Naylor <johncnaylorls@gmail.com> wrote:
> If it was from tooling, it must have stopped with the first case it
> found, as is often the case. I just tried myself and found three more
> apparent bugs with EXCLUDE both with and without the v1 patch. Do you
> want to see the reproducers, or rethink the risk/reward ratio of
> what's handled? I'm also not sure how common that clause is.
Please share what you discovered. It would be good to understand if
it's just a simple missing check that can be added to handle all
three, or if there's just more complexity in this than making this
work correctly is worth.
> Separately, I also I believe I found a counterexample to the part
> starting with /* No ORDER BY clause then all rows are peers */ :
Thanks for finding that. Looks like I failed to consider ROWs mode for
that, where the function is only monotonically increasing. The
attached includes a fix for that.
David