postgresql/src/backend
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
..
access hio: Take number of prior relation extensions into account 2023-08-14 11:33:09 -07:00
archive Redesign archive modules 2023-02-17 14:26:42 +09:00
backup Message wording improvements 2023-07-10 10:47:24 +02:00
bootstrap Fix CREATE INDEX progress reporting for multi-level partitioning. 2023-03-25 15:34:03 -04:00
catalog Recalculate search_path after ALTER ROLE. 2023-08-09 13:09:25 -07:00
commands Reject substituting extension schemas or owners matching ["$'\]. 2023-08-07 06:05:56 -07:00
executor Fix RLS policy usage in MERGE. 2023-08-07 09:28:47 +01:00
foreign Expand some more uses of "deleg" to "delegation" or "delegated". 2023-05-21 10:55:18 -04:00
jit Remove duplicated assignment of LLVMJitHandle->lljit 2023-07-13 16:44:17 +09:00
lib Fix ILIST_DEBUG build 2023-01-18 10:26:15 -08:00
libpq struct PQcommMethods: use C99 designated initializers 2023-08-09 11:30:59 +02:00
main Remove obsolete defense against strxfrm() bugs. 2023-04-20 13:20:14 +12:00
nodes Add more SQL/JSON constructor functions 2023-07-26 17:08:33 +09:00
optimizer Re-allow FDWs and custom scan providers to replace joins with pseudoconstant quals. 2023-08-15 16:45:00 +09:00
parser Show GIDs of two-phase commit commands as constants in pg_stat_statements 2023-08-12 10:44:15 +09:00
partitioning Add missing ObjectIdGetDatum() in syscache lookup calls for Oids 2023-07-20 15:18:25 +09:00
po Translation updates 2023-08-07 12:39:30 +02:00
port Add GUC parameter "huge_pages_status" 2023-07-06 14:42:36 +09:00
postmaster Refactor to split Apply and Tablesync Workers code. 2023-08-03 08:59:50 +05:30
regex All supported systems have locale_t. 2023-07-09 11:55:18 +12:00
replication Simplify determining logical replication worker types. 2023-08-14 08:38:03 +05:30
rewrite Fix RLS policy usage in MERGE. 2023-08-07 09:28:47 +01:00
snowball Fix the install rule for snowball_create.sql. 2023-05-23 11:15:57 -04:00
statistics Take pg_attribute out of VacAttrStats 2023-07-03 07:18:57 +02:00
storage De-pessimize ConditionVariableCancelSleep(). 2023-08-15 10:23:47 +12:00
tcop Be more rigorous about local variables in PostgresMain(). 2023-07-10 12:14:34 -04:00
tsearch Take pg_attribute out of VacAttrStats 2023-07-03 07:18:57 +02:00
utils Change custom wait events to use dynamic shared hash tables 2023-08-14 14:47:27 +09:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile Generate automatically code and documentation related to wait events 2023-07-05 10:53:11 +09:00
meson.build Add win32ver data to meson-built postgres.exe. 2023-06-12 07:40:38 -07:00
nls.mk Add missing gettext triggers 2023-05-10 13:51:51 +02:00