提交 9b838fab 编写于 作者: H Heikki Linnakangas

Remove duplicate test.

Both bfv_partition and partition_ddl had the essentially the same test.
Keep the copy in partition_ddl, and move the "alter table" commands that
were only present in the bfv_partition copy there.
上级 e2778699
...@@ -758,102 +758,6 @@ ERROR: relation "mpp3542_000000000011111111112222222222333333333344444444445555 ...@@ -758,102 +758,6 @@ ERROR: relation "mpp3542_000000000011111111112222222222333333333344444444445555
-- MPP-3542 -- MPP-3542
alter table mpp3542_0000000000111111111122222222223333333333444444444455555 rename to m; alter table mpp3542_0000000000111111111122222222223333333333444444444455555 rename to m;
ERROR: relation "mpp3542_0000000000111111111122222222223333333333444444444455555" does not exist ERROR: relation "mpp3542_0000000000111111111122222222223333333333444444444455555" does not exist
CREATE TABLE MULTI_PART2(a int, b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int)
distributed by (a)
partition by range (a)
subpartition by range (b) subpartition template ( start (1) end (2) every (1)),
subpartition by range (c) subpartition template ( start (1) end (2) every (1)),
subpartition by range (d) subpartition template ( start (1) end (2) every (1)),
subpartition by range (e) subpartition template ( start (1) end (2) every (1)),
subpartition by range (f) subpartition template ( start (1) end (2) every (1)),
subpartition by range (g) subpartition template ( start (1) end (2) every (1)),
subpartition by range (h) subpartition template ( start (1) end (2) every (1)),
subpartition by range (i) subpartition template ( start (1) end (2) every (1)),
subpartition by range (j) subpartition template ( start (1) end (2) every (1)),
subpartition by range (k) subpartition template ( start (1) end (2) every (1)),
subpartition by range (l) subpartition template ( start (1) end (2) every (1)),
subpartition by range (m) subpartition template ( start (1) end (2) every (1)),
subpartition by range (n) subpartition template ( start (1) end (2) every (1)),
subpartition by range (o) subpartition template ( start (1) end (2) every (1)),
subpartition by range (p) subpartition template ( start (1) end (2) every (1)),
subpartition by range (q) subpartition template ( start (1) end (2) every (1)),
subpartition by range (r) subpartition template ( start (1) end (2) every (1)),
subpartition by range (s) subpartition template ( start (1) end (2) every (1)),
subpartition by range (t) subpartition template ( start (1) end (2) every (1)),
subpartition by range (u) subpartition template ( start (1) end (2) every (1)),
subpartition by range (v) subpartition template ( start (1) end (2) every (1)),
subpartition by range (w) subpartition template ( start (1) end (2) every (1)),
subpartition by range (x) subpartition template ( start (1) end (2) every (1)),
subpartition by range (y) subpartition template ( start (1) end (2) every (1)),
subpartition by range (z) subpartition template ( start (1) end (2) every (1))
( start (1) end (2) every (1));
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1" for table "multi_part2"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1" for table "multi_part2_1_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1" for table "multi_part2_1_prt_1_2_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_p_7_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_p_8_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_p_7_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_p_9_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_p_8_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__10_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_p_9_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__11_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__10_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__12_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__11_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__13_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__12_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__14_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__13_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__15_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__14_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__16_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__15_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__17_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__16_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__18_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__17_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__19_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__18_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__20_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__19_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__21_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__20_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__22_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__21_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__23_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__22_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__24_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__23_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__25_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__24_prt_1"
NOTICE: CREATE TABLE will create partition "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__26_prt_1" for table "multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__25_prt_1"
alter table multi_part2 rename to multi_part2_0000000;
ERROR: relation name "multi_part2_0000000_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_prt_1" for child partition is too long
alter table multi_part2 rename to m_0000000;
WARNING: renamed 6 partitions, skipped 20 child partitions due to name truncation
-- We want to check both m and m_00000, thus I didn't put where clause
-- Assumes that there are no other partitions
-- order 2
select tablename, partitionlevel, partitiontablename, partitionname, partitionrank, partitionboundary from pg_partitions where tablename like 'm_000%' order by tablename;
tablename | partitionlevel | partitiontablename | partitionname | partitionrank | partitionboundary
-----------+----------------+-----------------------------------------------------------------+---------------+---------------+-----------------------------
m_0000000 | 0 | m_0000000_1_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 1 | m_0000000_1_prt_1_2_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 2 | m_0000000_1_prt_1_2_prt_1_3_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 3 | m_0000000_1_prt_1_2_prt_1_3_prt_1_4_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 4 | m_0000000_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 5 | m_0000000_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 6 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_p_7_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 7 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_p_8_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 8 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_p_9_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 9 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__10_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 10 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__11_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 11 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__12_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 12 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__13_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 13 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__14_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 14 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__15_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 15 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__16_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 16 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__17_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 17 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__18_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 18 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__19_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 19 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__20_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 20 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__21_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 21 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__22_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 22 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__23_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 23 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__24_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 24 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__25_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 25 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__26_prt_1 | | 1 | START (1) END (2) EVERY (1)
(26 rows)
drop table m;
ERROR: table "m" does not exist
drop table m_0000000;
create table mpp3466 (i int) partition by range(i) (start(1) end(10) every(2), default partition f); create table mpp3466 (i int) partition by range(i) (start(1) end(10) every(2), default partition f);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Greenplum Database data distribution key for this table. NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew. HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
......
...@@ -363,7 +363,9 @@ alter table mpp3265 drop partition for (-5); ...@@ -363,7 +363,9 @@ alter table mpp3265 drop partition for (-5);
alter table mpp3265 drop partition for (0); alter table mpp3265 drop partition for (0);
drop table mpp3265; drop table mpp3265;
CREATE TABLE mpp3237(a int, b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int)
-- Test very deeply nested subpartitioning
CREATE TABLE MULTI_PART2(a int, b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int)
distributed by (a) distributed by (a)
partition by range (a) partition by range (a)
subpartition by range (b) subpartition template ( start (1) end (2) every (1)), subpartition by range (b) subpartition template ( start (1) end (2) every (1)),
...@@ -392,8 +394,12 @@ subpartition by range (x) subpartition template ( start (1) end (2) every (1)), ...@@ -392,8 +394,12 @@ subpartition by range (x) subpartition template ( start (1) end (2) every (1)),
subpartition by range (y) subpartition template ( start (1) end (2) every (1)), subpartition by range (y) subpartition template ( start (1) end (2) every (1)),
subpartition by range (z) subpartition template ( start (1) end (2) every (1)) subpartition by range (z) subpartition template ( start (1) end (2) every (1))
( start (1) end (2) every (1)); ( start (1) end (2) every (1));
alter table multi_part2 rename to multi_part2_0000000;
alter table multi_part2 rename to m_0000000;
select tablename, partitionlevel, partitiontablename, partitionname, partitionrank, partitionboundary from pg_partitions where tablename like 'm_000%' order by tablename;
drop table m_0000000;
DROP TABLE mpp3237;
drop TABLE IF EXISTS INT_P1A CASCADE; drop TABLE IF EXISTS INT_P1A CASCADE;
CREATE TABLE INT_P1A ( num1 INTEGER NOT NULL, CREATE TABLE INT_P1A ( num1 INTEGER NOT NULL,
num2 INTEGER NOT NULL, num2 INTEGER NOT NULL,
......
...@@ -409,7 +409,8 @@ alter table mpp3265 drop partition for (0); ...@@ -409,7 +409,8 @@ alter table mpp3265 drop partition for (0);
ERROR: FOR expression matches DEFAULT partition "default_part" of relation "mpp3265" ERROR: FOR expression matches DEFAULT partition "default_part" of relation "mpp3265"
HINT: FOR expression may only specify a non-default partition in this context. HINT: FOR expression may only specify a non-default partition in this context.
drop table mpp3265; drop table mpp3265;
CREATE TABLE mpp3237(a int, b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int) -- Test very deeply nested subpartitioning
CREATE TABLE MULTI_PART2(a int, b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int)
distributed by (a) distributed by (a)
partition by range (a) partition by range (a)
subpartition by range (b) subpartition template ( start (1) end (2) every (1)), subpartition by range (b) subpartition template ( start (1) end (2) every (1)),
...@@ -438,7 +439,42 @@ subpartition by range (x) subpartition template ( start (1) end (2) every (1)), ...@@ -438,7 +439,42 @@ subpartition by range (x) subpartition template ( start (1) end (2) every (1)),
subpartition by range (y) subpartition template ( start (1) end (2) every (1)), subpartition by range (y) subpartition template ( start (1) end (2) every (1)),
subpartition by range (z) subpartition template ( start (1) end (2) every (1)) subpartition by range (z) subpartition template ( start (1) end (2) every (1))
( start (1) end (2) every (1)); ( start (1) end (2) every (1));
DROP TABLE mpp3237; alter table multi_part2 rename to multi_part2_0000000;
ERROR: relation name "multi_part2_0000000_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_prt_1" for child partition is too long
alter table multi_part2 rename to m_0000000;
WARNING: renamed 6 partitions, skipped 20 child partitions due to name truncation
select tablename, partitionlevel, partitiontablename, partitionname, partitionrank, partitionboundary from pg_partitions where tablename like 'm_000%' order by tablename;
tablename | partitionlevel | partitiontablename | partitionname | partitionrank | partitionboundary
-----------+----------------+-----------------------------------------------------------------+---------------+---------------+-----------------------------
m_0000000 | 0 | m_0000000_1_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 1 | m_0000000_1_prt_1_2_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 2 | m_0000000_1_prt_1_2_prt_1_3_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 3 | m_0000000_1_prt_1_2_prt_1_3_prt_1_4_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 4 | m_0000000_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 5 | m_0000000_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 6 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_p_7_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 7 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_p_8_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 8 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6_p_9_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 9 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__10_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 10 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__11_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 11 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__12_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 12 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__13_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 13 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__14_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 14 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__15_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 15 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__16_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 16 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__17_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 17 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__18_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 18 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__19_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 19 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__20_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 20 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__21_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 21 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__22_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 22 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__23_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 23 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__24_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 24 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__25_prt_1 | | 1 | START (1) END (2) EVERY (1)
m_0000000 | 25 | multi_part2_1_prt_1_2_prt_1_3_prt_1_4_prt_1_5_prt_1_6__26_prt_1 | | 1 | START (1) END (2) EVERY (1)
(26 rows)
drop table m_0000000;
drop TABLE IF EXISTS INT_P1A CASCADE; drop TABLE IF EXISTS INT_P1A CASCADE;
CREATE TABLE INT_P1A ( num1 INTEGER NOT NULL, CREATE TABLE INT_P1A ( num1 INTEGER NOT NULL,
num2 INTEGER NOT NULL, num2 INTEGER NOT NULL,
......
...@@ -378,47 +378,6 @@ alter table mpp3542_0000000000111111111122222222223333333333444444444455555 rena ...@@ -378,47 +378,6 @@ alter table mpp3542_0000000000111111111122222222223333333333444444444455555 rena
-- MPP-3542 -- MPP-3542
alter table mpp3542_0000000000111111111122222222223333333333444444444455555 rename to m; alter table mpp3542_0000000000111111111122222222223333333333444444444455555 rename to m;
CREATE TABLE MULTI_PART2(a int, b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int)
distributed by (a)
partition by range (a)
subpartition by range (b) subpartition template ( start (1) end (2) every (1)),
subpartition by range (c) subpartition template ( start (1) end (2) every (1)),
subpartition by range (d) subpartition template ( start (1) end (2) every (1)),
subpartition by range (e) subpartition template ( start (1) end (2) every (1)),
subpartition by range (f) subpartition template ( start (1) end (2) every (1)),
subpartition by range (g) subpartition template ( start (1) end (2) every (1)),
subpartition by range (h) subpartition template ( start (1) end (2) every (1)),
subpartition by range (i) subpartition template ( start (1) end (2) every (1)),
subpartition by range (j) subpartition template ( start (1) end (2) every (1)),
subpartition by range (k) subpartition template ( start (1) end (2) every (1)),
subpartition by range (l) subpartition template ( start (1) end (2) every (1)),
subpartition by range (m) subpartition template ( start (1) end (2) every (1)),
subpartition by range (n) subpartition template ( start (1) end (2) every (1)),
subpartition by range (o) subpartition template ( start (1) end (2) every (1)),
subpartition by range (p) subpartition template ( start (1) end (2) every (1)),
subpartition by range (q) subpartition template ( start (1) end (2) every (1)),
subpartition by range (r) subpartition template ( start (1) end (2) every (1)),
subpartition by range (s) subpartition template ( start (1) end (2) every (1)),
subpartition by range (t) subpartition template ( start (1) end (2) every (1)),
subpartition by range (u) subpartition template ( start (1) end (2) every (1)),
subpartition by range (v) subpartition template ( start (1) end (2) every (1)),
subpartition by range (w) subpartition template ( start (1) end (2) every (1)),
subpartition by range (x) subpartition template ( start (1) end (2) every (1)),
subpartition by range (y) subpartition template ( start (1) end (2) every (1)),
subpartition by range (z) subpartition template ( start (1) end (2) every (1))
( start (1) end (2) every (1));
alter table multi_part2 rename to multi_part2_0000000;
alter table multi_part2 rename to m_0000000;
-- We want to check both m and m_00000, thus I didn't put where clause
-- Assumes that there are no other partitions
-- order 2
select tablename, partitionlevel, partitiontablename, partitionname, partitionrank, partitionboundary from pg_partitions where tablename like 'm_000%' order by tablename;
drop table m;
drop table m_0000000;
create table mpp3466 (i int) partition by range(i) (start(1) end(10) every(2), default partition f); create table mpp3466 (i int) partition by range(i) (start(1) end(10) every(2), default partition f);
alter table mpp3466 split partition f at (3) into (partition f, partition new); alter table mpp3466 split partition f at (3) into (partition f, partition new);
drop table mpp3466; drop table mpp3466;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册