@@ -12,8 +12,8 @@ SELECT pathman.create_hash_partitions('test.hash_rel', 'value', 3);
12
12
ERROR: Partitioning key 'value' must be NOT NULL
13
13
ALTER TABLE test.hash_rel ALTER COLUMN value SET NOT NULL;
14
14
SELECT pathman.create_hash_partitions('test.hash_rel', 'Value', 3);
15
- NOTICE: function test.hash_rel_hash_insert_trigger_func () does not exist, skipping
16
- NOTICE: function test.hash_rel_hash_update_trigger_func () does not exist, skipping
15
+ NOTICE: function test.hash_rel_insert_trigger_func () does not exist, skipping
16
+ NOTICE: function test.hash_rel_update_trigger_func () does not exist, skipping
17
17
NOTICE: Copying data to partitions...
18
18
create_hash_partitions
19
19
------------------------
@@ -600,15 +600,26 @@ CREATE TABLE test.range_rel_test2 (
600
600
dt TIMESTAMP);
601
601
SELECT pathman.attach_range_partition('test.range_rel', 'test.range_rel_test2', '2013-01-01'::DATE, '2014-01-01'::DATE);
602
602
ERROR: Partition must have the exact same structure as parent P0001
603
+ /*
604
+ * Check that altering table columns doesn't break trigger
605
+ */
606
+ ALTER TABLE test.hash_rel ADD COLUMN abc int;
607
+ INSERT INTO test.hash_rel (id, value, abc) VALUES (123, 456, 789);
608
+ SELECT * FROM test.hash_rel WHERE id = 123;
609
+ id | value | abc
610
+ -----+-------+-----
611
+ 123 | 456 | 789
612
+ (1 row)
613
+
603
614
/*
604
615
* Clean up
605
616
*/
606
617
SELECT pathman.drop_hash_partitions('test.hash_rel');
607
618
NOTICE: drop cascades to trigger test_hash_rel_insert_trigger on table test.hash_rel
608
- NOTICE:function test.hash_rel_hash_update_trigger_func() does not exist, skipping
619
+ NOTICE:drop cascades to 3 other objects
609
620
NOTICE: 2 rows copied from test.hash_rel_2
610
621
NOTICE: 3 rows copied from test.hash_rel_1
611
- NOTICE:1 rows copied from test.hash_rel_0
622
+ NOTICE:2 rows copied from test.hash_rel_0
612
623
drop_hash_partitions
613
624
----------------------
614
625
3
@@ -617,12 +628,12 @@ NOTICE: 1 rows copied from test.hash_rel_0
617
628
SELECT COUNT(*) FROM ONLY test.hash_rel;
618
629
count
619
630
-------
620
- 6
631
+ 7
621
632
(1 row)
622
633
623
634
SELECT pathman.create_hash_partitions('test.hash_rel', 'value', 3);
624
- NOTICE: function test.hash_rel_hash_insert_trigger_func () does not exist, skipping
625
- NOTICE: function test.hash_rel_hash_update_trigger_func () does not exist, skipping
635
+ NOTICE: function test.hash_rel_insert_trigger_func () does not exist, skipping
636
+ NOTICE: function test.hash_rel_update_trigger_func () does not exist, skipping
626
637
NOTICE: Copying data to partitions...
627
638
create_hash_partitions
628
639
------------------------
@@ -631,7 +642,7 @@ NOTICE: Copying data to partitions...
631
642
632
643
SELECT pathman.drop_hash_partitions('test.hash_rel', TRUE);
633
644
NOTICE: drop cascades to trigger test_hash_rel_insert_trigger on table test.hash_rel
634
- NOTICE: function test.hash_rel_hash_update_trigger_func () does not exist, skipping
645
+ NOTICE: function test.hash_rel_update_trigger_func () does not exist, skipping
635
646
drop_hash_partitions
636
647
----------------------
637
648
3
@@ -770,8 +781,8 @@ CREATE TABLE hash_rel (
770
781
valueINTEGER NOT NULL);
771
782
INSERT INTO hash_rel (value) SELECT g FROM generate_series(1, 10000) as g;
772
783
SELECT create_hash_partitions('hash_rel', 'value', 3);
773
- NOTICE: functionhash_rel_hash_insert_trigger_func () does not exist, skipping
774
- NOTICE: functionhash_rel_hash_update_trigger_func () does not exist, skipping
784
+ NOTICE: functionhash_rel_insert_trigger_func () does not exist, skipping
785
+ NOTICE: functionhash_rel_update_trigger_func () does not exist, skipping
775
786
NOTICE: Copying data to partitions...
776
787
create_hash_partitions
777
788
------------------------