=== Applying patches on top of PostgreSQL commit ID b7e4e3e7fa73458ecca5cd10f341743fd12a4faa === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Mon Jun 29 07:10:25 UTC 2026 On branch cf/6778 nothing to commit, working tree clean === using 'git am' to apply patch ./v10-0001-Reject-child-partition-FDWs-in-FOR-PORTION-OF.patch === Applying: Reject child partition FDWs in FOR PORTION OF Using index info to reconstruct a base tree... M contrib/postgres_fdw/expected/postgres_fdw.out M contrib/postgres_fdw/sql/postgres_fdw.sql M src/backend/commands/copyfrom.c M src/backend/executor/execMain.c M src/backend/executor/execPartition.c M src/backend/executor/nodeModifyTable.c M src/backend/parser/analyze.c M src/include/executor/executor.h Falling back to patching base and 3-way merge... Auto-merging src/backend/parser/analyze.c Auto-merging src/backend/executor/execMain.c CONFLICT (content): Merge conflict in src/backend/executor/execMain.c Auto-merging contrib/postgres_fdw/expected/postgres_fdw.out CONFLICT (content): Merge conflict in contrib/postgres_fdw/expected/postgres_fdw.out error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 Reject child partition FDWs in FOR PORTION OF When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". === using patch(1) to apply patch ./v10-0001-Reject-child-partition-FDWs-in-FOR-PORTION-OF.patch === patching file contrib/postgres_fdw/expected/postgres_fdw.out Hunk #1 FAILED at 6335. Hunk #2 FAILED at 6346. Hunk #3 FAILED at 6354. 3 out of 3 hunks FAILED -- saving rejects to file contrib/postgres_fdw/expected/postgres_fdw.out.rej patching file contrib/postgres_fdw/sql/postgres_fdw.sql Hunk #1 FAILED at 1578. 1 out of 1 hunk FAILED -- saving rejects to file contrib/postgres_fdw/sql/postgres_fdw.sql.rej patching file src/backend/commands/copyfrom.c Hunk #1 FAILED at 921. 1 out of 1 hunk FAILED -- saving rejects to file src/backend/commands/copyfrom.c.rej patching file src/backend/executor/execMain.c Hunk #1 FAILED at 1063. Hunk #2 succeeded at 1245 with fuzz 2 (offset 119 lines). 1 out of 2 hunks FAILED -- saving rejects to file src/backend/executor/execMain.c.rej patching file src/backend/executor/execPartition.c Hunk #1 FAILED at 368. Hunk #2 FAILED at 594. 2 out of 2 hunks FAILED -- saving rejects to file src/backend/executor/execPartition.c.rej patching file src/backend/executor/nodeModifyTable.c Hunk #1 FAILED at 5312. 1 out of 1 hunk FAILED -- saving rejects to file src/backend/executor/nodeModifyTable.c.rej patching file src/backend/parser/analyze.c Hunk #1 FAILED at 1335. 1 out of 1 hunk FAILED -- saving rejects to file src/backend/parser/analyze.c.rej patching file src/include/executor/executor.h Hunk #1 FAILED at 249. 1 out of 1 hunk FAILED -- saving rejects to file src/include/executor/executor.h.rej Unstaged changes after reset: M src/backend/executor/execMain.c Removing contrib/postgres_fdw/expected/postgres_fdw.out.rej Removing contrib/postgres_fdw/sql/postgres_fdw.sql.rej Removing src/backend/commands/copyfrom.c.rej Removing src/backend/executor/execMain.c.rej Removing src/backend/executor/execPartition.c.rej Removing src/backend/executor/nodeModifyTable.c.rej Removing src/backend/parser/analyze.c.rej Removing src/include/executor/executor.h.rej === using 'git apply' to apply patch ./v10-0001-Reject-child-partition-FDWs-in-FOR-PORTION-OF.patch === Applied patch to 'contrib/postgres_fdw/expected/postgres_fdw.out' with conflicts. Applied patch to 'contrib/postgres_fdw/sql/postgres_fdw.sql' cleanly. Applied patch to 'src/backend/commands/copyfrom.c' cleanly. Applied patch to 'src/backend/executor/execMain.c' with conflicts. Applied patch to 'src/backend/executor/execPartition.c' cleanly. Applied patch to 'src/backend/executor/nodeModifyTable.c' cleanly. Applied patch to 'src/backend/parser/analyze.c' cleanly. Applied patch to 'src/include/executor/executor.h' cleanly. U contrib/postgres_fdw/expected/postgres_fdw.out U src/backend/executor/execMain.c diff --cc contrib/postgres_fdw/expected/postgres_fdw.out index 0805c56cb1b,2f7452d262e..00000000000 --- a/contrib/postgres_fdw/expected/postgres_fdw.out +++ b/contrib/postgres_fdw/expected/postgres_fdw.out @@@ -6372,11 -6370,9 +6372,17 @@@ CREATE FOREIGN TABLE fpo_part_foreig DELETE FROM fpo_part_parent FOR PORTION OF c4 FROM '2001-01-01' TO '2001-02-01' WHERE c2 = 6; -- error ERROR: foreign tables don't support FOR PORTION OF ++<<<<<<< ours +DETAIL: "fpo_part_foreign" is a foreign table. UPDATE fpo_part_parent FOR PORTION OF c4 FROM '2001-01-01' TO '2001-02-01' SET c3 = 'x' WHERE c2 = 6; -- error ERROR: foreign tables don't support FOR PORTION OF +DETAIL: "fpo_part_foreign" is a foreign table. ++======= ++UPDATE fpo_part_parent ++ FOR PORTION OF c4 FROM '2001-01-01' TO '2001-02-01' SET c3 = 'x' WHERE c2 = 6; -- error ++ERROR: foreign tables don't support FOR PORTION OF ++>>>>>>> theirs UPDATE fpo_part_parent FOR PORTION OF c4 FROM '2024-06-01' TO '2024-07-01' SET c3 = 'edited' WHERE c2 = 1; -- okay DELETE FROM fpo_part_parent diff --cc src/backend/executor/execMain.c index c3af96989ba,06de3a4461c..00000000000 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@@ -1131,9 -1131,7 +1131,13 @@@ CheckValidResultRel(ResultRelInfo *resu if (mtnode && mtnode->forPortionOf) ereport(ERROR, errcode(ERRCODE_FEATURE_NOT_SUPPORTED), ++<<<<<<< ours + errmsg("foreign tables don't support FOR PORTION OF"), + errdetail("\"%s\" is a foreign table.", + RelationGetRelationName(resultRel))); ++======= + errmsg("foreign tables don't support FOR PORTION OF")); ++>>>>>>> theirs /* Okay only if the FDW supports it */ fdwroutine = resultRelInfo->ri_FdwRoutine;