@@ -920,13 +920,19 @@ Inherits: test.hash_rel
920920
921921INSERT INTO test.hash_rel SELECT * FROM test.hash_rel_0;
922922DROP 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
930936(4 rows)
931937
932938/*
@@ -1508,7 +1514,7 @@ SELECT count(*) FROM bool_test WHERE b = false;
15081514DROP TABLE bool_test CASCADE;
15091515NOTICE: drop cascades to 3 other objects
15101516DROP SCHEMA test CASCADE;
1511- NOTICE: drop cascades to 13 other objects
1517+ NOTICE: drop cascades to 14 other objects
15121518DROP EXTENSION pg_pathman CASCADE;
15131519NOTICE: drop cascades to 3 other objects
15141520DROP SCHEMA pathman CASCADE;
0 commit comments