diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2023-02-10 14:52:36 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2023-02-10 14:52:36 -0500 |
commit | 44e56baa80ff5fba150897308c8f25aa2251b16c (patch) | |
tree | fab48aa34012a786d33bfa79755c2e3cca28fa3c /src/backend/utils/adt/pgstatfuncs.c | |
parent | acc5821e4dcb6b7df6ad1f806459f95fcaebadfc (diff) | |
download | postgresql-44e56baa80ff5fba150897308c8f25aa2251b16c.tar.gz postgresql-44e56baa80ff5fba150897308c8f25aa2251b16c.zip |
Fix join removal logic to clean up sub-RestrictInfos of OR clauses.
analyzejoins.c took care to clean out removed relids from the
clause_relids and required_relids of RestrictInfos associated with
the doomed rel ... but it paid no attention to the fact that if such a
RestrictInfo contains an OR clause, there will be sub-RestrictInfos
containing similar fields.
I'm more than a bit surprised that this oversight hasn't caused
visible problems before. In any case, it's certainly broken now,
so add logic to clean out the sub-RestrictInfos recursively.
We might need to back-patch this someday.
Per bug #17786 from Robins Tharakan.
Discussion: https://postgr.es/m/17786-f1ea7fbdab97daec@postgresql.org
Diffstat (limited to 'src/backend/utils/adt/pgstatfuncs.c')
0 files changed, 0 insertions, 0 deletions