Re: pull-up subquery if JOIN-ON contains refs to upper-query

From: Alena Rybakina <lena(dot)ribackina(at)yandex(dot)ru>
To: Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>, Peter Petrov <p(dot)petrov(at)postgrespro(dot)ru>, David Rowley <dgrowleyml(at)gmail(dot)com>
Subject: Re: pull-up subquery if JOIN-ON contains refs to upper-query
Date: 2026-03-30 05:41:07
Message-ID: 0686b354-57dc-46e9-b756-21661c656c10@yandex.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have updated the patch with some bug-fixes after having run Smith's
test with lateral and null elements.

To detect lateral elements I left the check that there are no one outer
references left in the subquery after the mutator transformation.

Everything looks well now. I currently continue testing my patch to
detect more corner-cases.

Feel free to review my patch!

-----------
Best regards,
Yandex Cloud
Alena Rybakina

Attachment Content-Type Size
v7-0001-Enables-pull-up-of-EXISTS-subqueries-that-contain-IN.patch text/plain 42.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2026-03-30 05:49:45 Re: SQL Property Graph Queries (SQL/PGQ)
Previous Message Fujii Masao 2026-03-30 05:40:49 Re: [PATCH] Fix unexpected loss of DEFERRABLE property after toggling NOT ENFORCED / ENFORCED