Remove unused arguments from split_selfjoin_quals()
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
This thread has been committed, so CI has stopped here. Anything below is the last result it produced.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t253478psql -h localhost -U postgresBuilt from patchset v3 (message #3), November 02, 2026 at 06:26 AM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t253478_3 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t253478_3 && git checkout t253478_3Patchset v3 (message #3) is on t253478_3
Hi,
While reviewing a patch for a self-join elimination bug, I noticed that
split_selfjoin_quals() takes "from" and "to" arguments. These names also
seemed a little inconsistent with the "remove" and "keep" terminology
used by the surrounding SJE code.
Looking further, I found that neither of these arguments is actually
used by the function. The "root" argument is unused as well. I also
checked the history and found that these arguments have been unused
since the SJE code was initially committed.
The attached patch removes these three unused arguments and simplifies
the function interface. There is no functional change.
--
Thanks,
Tender Wang
Hi Tender
I think `root` argument was introduced in [1]/messages/by-id/CAKJS1f8cJOCGyoxi7a_LG7eu+WKF9+HTff3wp1KKS5gcUg2Qfg@mail.gmail.com to do an assertion,
but that assertion was removed shortly after being added.
`from` and `to` on the other hand were introduced in [2]/messages/by-id/c97574c4-13e6-9107-26ab-af2bd626fc85@postgrespro.ru,
but weren't used from the start.
LGTM!
[1]: /messages/by-id/CAKJS1f8cJOCGyoxi7a_LG7eu+WKF9+HTff3wp1KKS5gcUg2Qfg@mail.gmail.com
[2]: /messages/by-id/c97574c4-13e6-9107-26ab-af2bd626fc85@postgrespro.ru
Kind regards,
Miłosz Bieniek
Miłosz Bieniek <bieniek.milosz@proton.me> 于2026年8月27日周四 18:21写道:
I think `root` argument was introduced in [1] to do an assertion,
but that assertion was removed shortly after being added.
`from` and `to` on the other hand were introduced in [2],
but weren't used from the start.LGTM!
[1] /messages/by-id/CAKJS1f8cJOCGyoxi7a_LG7eu+WKF9+HTff3wp1KKS5gcUg2Qfg@mail.gmail.com
[2] /messages/by-id/c97574c4-13e6-9107-26ab-af2bd626fc85@postgrespro.ru
Thanks, Miłosz, for the review and the historical details.
While looking through the SJE code again, I noticed that the "root"
argument of match_unique_clauses() is also unused. Attached is v2,
which removes that argument in addition to the three unused arguments
of split_selfjoin_quals() covered by the original patch.
There is no functional change.
--
Thanks,
Tender Wang
On Sun, Nov 1, 2026 at 3:12 PM Tender Wang <tndrwang@gmail.com> wrote:
While looking through the SJE code again, I noticed that the "root"
argument of match_unique_clauses() is also unused. Attached is v2,
which removes that argument in addition to the three unused arguments
of split_selfjoin_quals() covered by the original patch.
Thanks for the patch! LGTM.
Barring any objections, I will commit it.
Regards,
--
Fujii Masao