@@ -920,13 +920,19 @@ Inherits: test.hash_rel
920
920
921
921
INSERT INTO test.hash_rel SELECT * FROM test.hash_rel_0;
922
922
DROP TABLE test.hash_rel_0;
923
- EXPLAIN SELECT * FROM test.hash_rel;
924
- QUERY PLAN
925
- ---------------------------------------------------------------------------------------------
926
- Append (cost=10000000000.00..30000000032.44 rows=2044 width=12)
927
- -> Seq Scan on hash_rel_extern (cost=10000000000.00..10000000030.40 rows=2040 width=12)
928
- -> Seq Scan on hash_rel_1 (cost=10000000000.00..10000000001.02 rows=2 width=12)
929
- -> Seq Scan on hash_rel_2 (cost=10000000000.00..10000000001.02 rows=2 width=12)
923
+ /* Table with which we are replacing partition must have exact same structure */
924
+ CREATE TABLE test.hash_rel_wrong(
925
+ id INTEGER NOT NULL,
926
+ value INTEGER);
927
+ SELECT pathman.replace_hash_partition('test.hash_rel_1', 'test.hash_rel_wrong');
928
+ ERROR: partition must have the exact same structure as parent
929
+ EXPLAIN (COSTS OFF) SELECT * FROM test.hash_rel;
930
+ QUERY PLAN
931
+ -----------------------------------
932
+ Append
933
+ -> Seq Scan on hash_rel_extern
934
+ -> Seq Scan on hash_rel_1
935
+ -> Seq Scan on hash_rel_2
930
936
(4 rows)
931
937
932
938
/*
@@ -1508,7 +1514,7 @@ SELECT count(*) FROM bool_test WHERE b = false;
1508
1514
DROP TABLE bool_test CASCADE;
1509
1515
NOTICE: drop cascades to 3 other objects
1510
1516
DROP SCHEMA test CASCADE;
1511
- NOTICE: drop cascades to 13 other objects
1517
+ NOTICE: drop cascades to 14 other objects
1512
1518
DROP EXTENSION pg_pathman CASCADE;
1513
1519
NOTICE: drop cascades to 3 other objects
1514
1520
DROP SCHEMA pathman CASCADE;
0 commit comments