On Thu, 23 Oct 2025 at 15:59, David Rowley <dgrowleyml@gmail.com> wrote:
> > No backpatch as this could result in plan changes.
>
> If this is broken then it'll need to be backpatched as if that
> function returns true when it should return false, then you could have
> LEFT JOINs being removed when they shouldn't or joins being marked as
> "Inner Unique" when they shouldn't, which could result in incorrect
> query results.
Or if it's a case of it returning false when it could have returned
true, then maybe the commit message should make that clear. I'm unable
to tell from reading it. Something like; "The previous logic in
query_is_distinct_for() was incomplete [as it failed to detect that a
query was distinct when ...]".
David