| From: | Roberto Mello <roberto(dot)mello(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Cc: | guofenglinux(at)gmail(dot)com, zhong950419(at)gmail(dot)com |
| Subject: | Re: FULL JOIN planning failure with virtual generated columns |
| Date: | 2026-12-06 02:20:41 |
| Message-ID: | CAKz==b+b-++3TaGFxVA8Vsf_4PqOEKoU_Ru06L9gj2A0qwMDXQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Richard Guo wrote:
> The attached patch detaches the jointree before expanding the rest of
> the query, and then expands its quals with replace_vars_in_jointree().
I applied v1 on master (8d90516) and compared against the same tables with
STORED columns, rows (1), (2), (NULL):
- k (1) virtual, t1.k = t2.a: errors on master, works with the patch,
results match stored.
- k coalesce(1, a) virtual: same.
- t1.a = t2.k (constant on the other side): errors on master, works,
matches stored.
- LEFT/RIGHT JOIN, t1.k = t2.k, k (a + 1) virtual, a subquery on one side,
and t1.k = t2.a AND t1.a = t2.a already work on master; results are
unchanged with the patch.
make check passes (cassert build).
The new test only covers the constant on the left side; maybe add the t1.a
= t2.k form too.
Roberto
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Roberto Mello | 2026-12-06 02:26:43 | Re: Requesting feedback on hybrid key exchange in Postgres |
| Previous Message | Roberto Mello | 2026-12-06 02:09:05 | Re: pg_dump writes a subscription's default slot name, which can't be restored |