postgresql/src/include/optimizer
Etsuro Fujita 9e9931d2bf Re-allow FDWs and custom scan providers to replace joins with pseudoconstant quals.
This was disabled in commit 6f80a8d9c due to the lack of support for
handling of pseudoconstant quals assigned to replaced joins in
createplan.c.  To re-allow it, this patch adds the support by 1)
modifying the ForeignPath and CustomPath structs so that if they
represent foreign and custom scans replacing a join with a scan, they
store the list of RestrictInfo nodes to apply to the join, as in
JoinPaths, and by 2) modifying create_scan_plan() in createplan.c so
that it uses that list in that case, instead of the baserestrictinfo
list, to get pseudoconstant quals assigned to the join, as mentioned in
the commit message for that commit.

Important item for the release notes: this is non-backwards-compatible
since it modifies the ForeignPath and CustomPath structs, as mentioned
above, and changes the argument lists for FDW helper functions
create_foreignscan_path(), create_foreign_join_path(), and
create_foreign_upper_path().

Richard Guo, with some additional changes by me, reviewed by Nishant
Sharma, Suraj Kharage, and Richard Guo.

Discussion: https://postgr.es/m/CADrsxdbcN1vejBaf8a%2BQhrZY5PXL-04mCd4GDu6qm6FigDZd6Q%40mail.gmail.com
2023-08-15 16:45:00 +09:00
..
appendinfo.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
clauses.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
cost.h Account for startup rows when costing WindowAggs 2023-08-04 09:27:38 +12:00
geqo.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_copy.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_gene.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_misc.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_mutation.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_pool.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_random.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_recombination.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geqo_selection.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
inherit.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
joininfo.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
optimizer.h Rename force_parallel_mode to debug_parallel_query 2023-02-15 21:21:59 +13:00
orclauses.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
paramassign.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
pathnode.h Re-allow FDWs and custom scan providers to replace joins with pseudoconstant quals. 2023-08-15 16:45:00 +09:00
paths.h Fix some issues with improper placement of outer join clauses. 2023-05-17 11:14:04 -04:00
placeholder.h Do assorted mop-up in the planner. 2023-01-30 13:44:36 -05:00
plancat.h Fix calculation of which GENERATED columns need to be updated. 2023-01-05 14:12:17 -05:00
planmain.h Account for optimized MinMax aggregates during SS_finalize_plan. 2023-07-14 11:41:20 -04:00
planner.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
prep.h Make Vars be outer-join-aware. 2023-01-30 13:16:20 -05:00
restrictinfo.h Re-allow FDWs and custom scan providers to replace joins with pseudoconstant quals. 2023-08-15 16:45:00 +09:00
subselect.h Allow plan nodes with initPlans to be considered parallel-safe. 2023-07-14 11:41:20 -04:00
tlist.h Update copyright for 2023 2023-01-02 15:00:37 -05:00