=== Applying patches on top of PostgreSQL commit ID e8bfad4ca842733b957c01e732ec009778f952cd === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Sat Nov 8 09:31:22 UTC 2025 On branch cf/5774 nothing to commit, working tree clean === using 'git am' to apply patch ./v4-0001-rebase-now-avtually-compiles.patch === Applying: rebase, now avtually compiles .git/rebase-apply/patch:15: trailing whitespace. * .git/rebase-apply/patch:38: trailing whitespace. * .git/rebase-apply/patch:39: trailing whitespace. * Skip the check when `session_replication_mode = replica` to save time .git/rebase-apply/patch:40: trailing whitespace. * and to match the FK trigger behaviour in the same situation .git/rebase-apply/patch:110: trailing whitespace. -- warning: squelched 1 whitespace error warning: 6 lines add whitespace errors. Using index info to reconstruct a base tree... M src/backend/commands/tablecmds.c M src/test/regress/expected/foreign_key.out M src/test/regress/sql/foreign_key.sql Falling back to patching base and 3-way merge... Auto-merging src/test/regress/sql/foreign_key.sql CONFLICT (content): Merge conflict in src/test/regress/sql/foreign_key.sql Auto-merging src/test/regress/expected/foreign_key.out Auto-merging src/backend/commands/tablecmds.c error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 rebase, now avtually compiles 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". Unstaged changes after reset: M src/backend/commands/tablecmds.c M src/test/regress/expected/foreign_key.out M src/test/regress/sql/foreign_key.sql === using patch(1) to apply patch ./v4-0001-rebase-now-avtually-compiles.patch === patching file src/backend/commands/tablecmds.c Hunk #2 succeeded at 6052 (offset 3 lines). Hunk #3 succeeded at 6102 (offset 3 lines). patching file src/test/regress/expected/foreign_key.out patching file src/test/regress/sql/foreign_key.sql Hunk #2 FAILED at 2386. 1 out of 2 hunks FAILED -- saving rejects to file src/test/regress/sql/foreign_key.sql.rej Unstaged changes after reset: M src/backend/commands/tablecmds.c M src/test/regress/expected/foreign_key.out M src/test/regress/sql/foreign_key.sql Removing src/test/regress/sql/foreign_key.sql.rej === using 'git apply' to apply patch ./v4-0001-rebase-now-avtually-compiles.patch === /work/patches/./v4-0001-rebase-now-avtually-compiles.patch:20: trailing whitespace. * /work/patches/./v4-0001-rebase-now-avtually-compiles.patch:43: trailing whitespace. * /work/patches/./v4-0001-rebase-now-avtually-compiles.patch:44: trailing whitespace. * Skip the check when `session_replication_mode = replica` to save time /work/patches/./v4-0001-rebase-now-avtually-compiles.patch:45: trailing whitespace. * and to match the FK trigger behaviour in the same situation /work/patches/./v4-0001-rebase-now-avtually-compiles.patch:115: trailing whitespace. -- Applied patch to 'src/backend/commands/tablecmds.c' cleanly. Applied patch to 'src/test/regress/expected/foreign_key.out' cleanly. Applied patch to 'src/test/regress/sql/foreign_key.sql' with conflicts. U src/test/regress/sql/foreign_key.sql warning: squelched 1 whitespace error warning: 6 lines add whitespace errors. diff --cc src/test/regress/sql/foreign_key.sql index 4a6172b8e56,d826694947f..00000000000 --- a/src/test/regress/sql/foreign_key.sql +++ b/src/test/regress/sql/foreign_key.sql @@@ -2387,50 -2437,3 +2437,53 @@@ DROP SCHEMA fkpart12 CASCADE RESET client_min_messages; RESET search_path; ++<<<<<<< ours +-- Exercise the column mapping code with foreign keys. In this test we'll +-- create a partitioned table which has a partition with a dropped column and +-- check to ensure that an UPDATE cascades the changes correctly to the +-- partitioned table. +CREATE SCHEMA fkpart13; +SET search_path TO fkpart13; + +CREATE TABLE fkpart13_t1 (a int PRIMARY KEY); + +CREATE TABLE fkpart13_t2 ( + part_id int PRIMARY KEY, + column_to_drop int, + FOREIGN KEY (part_id) REFERENCES fkpart13_t1 ON UPDATE CASCADE ON DELETE CASCADE +) PARTITION BY LIST (part_id); + +CREATE TABLE fkpart13_t2_p1 PARTITION OF fkpart13_t2 FOR VALUES IN (1); + +-- drop the column +ALTER TABLE fkpart13_t2 DROP COLUMN column_to_drop; + +-- create a new partition without the dropped column +CREATE TABLE fkpart13_t2_p2 PARTITION OF fkpart13_t2 FOR VALUES IN (2); + +CREATE TABLE fkpart13_t3 ( + a int NOT NULL, + FOREIGN KEY (a) + REFERENCES fkpart13_t2 + ON UPDATE CASCADE ON DELETE CASCADE +); + +INSERT INTO fkpart13_t1 (a) VALUES (1); +INSERT INTO fkpart13_t2 (part_id) VALUES (1); +INSERT INTO fkpart13_t3 (a) VALUES (1); + +-- Test a cascading update works correctly with with the dropped column +UPDATE fkpart13_t1 SET a = 2 WHERE a = 1; +SELECT tableoid::regclass,* FROM fkpart13_t2; +SELECT tableoid::regclass,* FROM fkpart13_t3; + +-- Exercise code in ExecGetTriggerResultRel() as there's been previous issues +-- with ResultRelInfos being returned with the incorrect ri_RootResultRelInfo +WITH cte AS ( + UPDATE fkpart13_t2_p1 SET part_id = part_id +) UPDATE fkpart13_t1 SET a = 2 WHERE a = 1; + +DROP SCHEMA fkpart13 CASCADE; +RESET search_path; ++======= ++>>>>>>> theirs