pgsql: postgres_fdw: Avoid pulling up restrict infos from subqueries - Mailing list pgsql-committers

From Alexander Korotkov
Subject pgsql: postgres_fdw: Avoid pulling up restrict infos from subqueries
Date
Msg-id E1twvJv-000rV1-1n@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
postgres_fdw: Avoid pulling up restrict infos from subqueries

Semi-join joins below left/right join are deparsed as
subqueries.  Thus, we can't refer to subqueries vars from upper relations.
This commit avoids pulling conditions from them.

Reported-by: Robins Tharakan <tharakan@gmail.com>
Bug: #18852
Discussion: https://postgr.es/m/CAEP4nAzryLd3gwcUpFBAG9MWyDfMRX8ZjuyY2XXjyC_C6k%2B_Zw%40mail.gmail.com
Author: Alexander Pyhalov <a.pyhalov@postgrespro.ru>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/729fe699e61231a01d834078c0566830638440ee

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 38 ++++++++++++++++++++++++++
contrib/postgres_fdw/postgres_fdw.c            | 32 ++++++++++++++++------
contrib/postgres_fdw/sql/postgres_fdw.sql      | 17 ++++++++++++
3 files changed, 79 insertions(+), 8 deletions(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: pgsql: Redefine max_files_per_process to control additionally opened fi
Next
From: Alexander Korotkov
Date:
Subject: pgsql: postgres_fdw: Avoid pulling up restrict infos from subqueries