These patches fix all my known failure cases (attached.) In addition, as a
plus, a small set of queries that previously didn't compile are now
accepted, for example:

SELECT coalesce(u1.id + 1, 1) AS o0
FROM (u AS u1 FULL JOIN (u AS u2 JOIN u AS u3 ON u2.id = u3.id)
              ON u2.id = u2.id)
GROUP BY 1;

... previously gave ERROR:  FULL JOIN is only supported with merge-joinable
or hash-joinable join conditions

now returns 10 rows (`2 … 11`), which I believe is correct.

```
 HashAggregate
   Group Key: COALESCE((u1.id + 1), 1)
   ->  Merge Full Join
         ->  Seq Scan on u u1
         ->  Materialize
               ->  Seq Scan on u u3
```

So that's nice.

On Sat, Jul 25, 2026 at 7:15 PM Tom Lane <[email protected]> wrote:

> Here's a patchset addressing that.  0001-0003 are the same as before,
> and then 0004 fixes this bug and adds tests.
>
> Your Claude session mentioned a different failure scenario, but
> gave no examples so I'm not quite sure if this covers it or not.
>
>                         regards, tom lane
>
>

Attachment: finding-81-queries.sql
Description: application/sql

Reply via email to