Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit05f4bbb

Browse files
committed
extend pathman_rebuild_updates test suite
1 parent297bd67 commit05f4bbb

File tree

2 files changed

+62
-1
lines changed

2 files changed

+62
-1
lines changed

‎expected/pathman_rebuild_updates.out‎

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,52 @@ RETURNING test;
103103
(1 row)
104104

105105
DROP 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+
106152
DROP SCHEMA test_updates CASCADE;
107-
NOTICE: drop cascades to13 other objects
153+
NOTICE: drop cascades to15 other objects
108154
DROP EXTENSION pg_pathman;

‎sql/pathman_rebuild_updates.sql‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,21 @@ RETURNING test;
5757
DROPTABLEtest_updates.test_dummy;
5858

5959

60+
/* cross-partition updates (& different tuple descs)*/
61+
TRUNCATEtest_updates.test;
62+
SETpg_pathman.enable_partitionrouter=ON;
63+
64+
SELECT*, (selectcount(*)from pg_attributewhere attrelid= partition)as columns
65+
FROM pathman_partition_list
66+
ORDER BY range_min::int, range_max::int;
67+
68+
INSERT INTOtest_updates.testVALUES (105,105);
69+
UPDATEtest_updates.testSET val=106WHERE val=105 RETURNING*, tableoid::REGCLASS;
70+
UPDATEtest_updates.testSET val=115WHERE val=106 RETURNING*, tableoid::REGCLASS;
71+
UPDATEtest_updates.testSET val=95WHERE val=115 RETURNING*, tableoid::REGCLASS;
72+
UPDATEtest_updates.testSET val=-1WHERE val=95 RETURNING*, tableoid::REGCLASS;
73+
74+
6075

6176
DROPSCHEMA test_updates CASCADE;
6277
DROP EXTENSION pg_pathman;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp