Re: BUG #19853: Memoize returns wrong rows when the join operator is hashable but its equality semantics differ from

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: 303677365(at)qq(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19853: Memoize returns wrong rows when the join operator is hashable but its equality semantics differ from
Date: 2026-11-11 01:39:18
Message-ID: CAApHDvpptUYwcZOLgiUwwKnmgKk5rNRZJx0+yZf2FeKw=nGnAQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 9 Nov 2026 at 12:07, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> The attached is a lightly edited LLM-generated fix with my
> supervision. Its first choice was to switch to binary mode for this
> case, but I told it to only change check_memoizable() and use the
> joinoperator when the left and right types match, and then only check
> to see if there's another suitable operator when the types don't
> match.

I spent more human time reviewing this and it turns out there's
perfectly good get_compatible_hash_operators() function that does the
job of what the LLM churned out to do the same thing. I swapped to
using that function. The test remains the one written by the LLM.

Now fixed back to v15. I'll look at the 0002 change for master only.

David

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message shihao zhong 2026-11-11 01:40:34 Re: JSON_SERIALIZE for JSONB returns parts of the internal JSONB representation
Previous Message PG Bug reporting form 2026-11-11 01:39:02 BUG #19861: Self-join elimination drops a VOLATILE predicate and changes the query result