@@ -103,6 +103,52 @@ RETURNING test;
103103(1 row)
104104
105105DROP TABLE test_updates.test_dummy;
106+ /* cross-partition updates (& different tuple descs) */
107+ TRUNCATE test_updates.test;
108+ SET pg_pathman.enable_partitionrouter = ON;
109+ SELECT *, (select count(*) from pg_attribute where attrelid = partition) as columns
110+ FROM pathman_partition_list
111+ ORDER BY range_min::int, range_max::int;
112+ parent | partition | parttype | expr | range_min | range_max | columns
113+ -------------------+----------------------+----------+------+-----------+-----------+---------
114+ test_updates.test | test_updates.test_1 | 2 | val | 1 | 11 | 9
115+ test_updates.test | test_updates.test_2 | 2 | val | 11 | 21 | 9
116+ test_updates.test | test_updates.test_3 | 2 | val | 21 | 31 | 9
117+ test_updates.test | test_updates.test_4 | 2 | val | 31 | 41 | 9
118+ test_updates.test | test_updates.test_5 | 2 | val | 41 | 51 | 9
119+ test_updates.test | test_updates.test_6 | 2 | val | 51 | 61 | 9
120+ test_updates.test | test_updates.test_7 | 2 | val | 61 | 71 | 9
121+ test_updates.test | test_updates.test_8 | 2 | val | 71 | 81 | 9
122+ test_updates.test | test_updates.test_9 | 2 | val | 81 | 91 | 9
123+ test_updates.test | test_updates.test_10 | 2 | val | 91 | 101 | 9
124+ test_updates.test | test_updates.test_11 | 2 | val | 101 | 111 | 8
125+ (11 rows)
126+
127+ INSERT INTO test_updates.test VALUES (105, 105);
128+ UPDATE test_updates.test SET val = 106 WHERE val = 105 RETURNING *, tableoid::REGCLASS;
129+ val | b | tableoid
130+ -----+-----+----------------------
131+ 106 | 105 | test_updates.test_11
132+ (1 row)
133+
134+ UPDATE test_updates.test SET val = 115 WHERE val = 106 RETURNING *, tableoid::REGCLASS;
135+ val | b | tableoid
136+ -----+-----+----------------------
137+ 115 | 105 | test_updates.test_12
138+ (1 row)
139+
140+ UPDATE test_updates.test SET val = 95 WHERE val = 115 RETURNING *, tableoid::REGCLASS;
141+ val | b | tableoid
142+ -----+-----+----------------------
143+ 95 | 105 | test_updates.test_10
144+ (1 row)
145+
146+ UPDATE test_updates.test SET val = -1 WHERE val = 95 RETURNING *, tableoid::REGCLASS;
147+ val | b | tableoid
148+ -----+-----+----------------------
149+ -1 | 105 | test_updates.test_13
150+ (1 row)
151+
106152DROP SCHEMA test_updates CASCADE;
107- NOTICE: drop cascades to13 other objects
153+ NOTICE: drop cascades to15 other objects
108154DROP EXTENSION pg_pathman;