@@ -81,7 +81,6 @@ SELECT * FROM test.hash_rel;
81
81
(3 rows)
82
82
83
83
SELECT pathman.drop_partitions('test.hash_rel');
84
- NOTICE: function test.hash_rel_upd_trig_func() does not exist, skipping
85
84
NOTICE: 0 rows copied from test.hash_rel_0
86
85
NOTICE: 0 rows copied from test.hash_rel_1
87
86
NOTICE: 0 rows copied from test.hash_rel_2
@@ -570,10 +569,10 @@ SET pg_pathman.enable_runtimeappend = OFF;
570
569
SET pg_pathman.enable_runtimemergeappend = OFF;
571
570
VACUUM;
572
571
/* update triggers test */
573
- SELECT pathman.create_hash_update_trigger ('test.hash_rel');
574
- create_hash_update_trigger
575
- -----------------------------
576
- test.hash_rel_upd_trig_func
572
+ SELECT pathman.create_update_triggers ('test.hash_rel');
573
+ create_update_triggers
574
+ ------------------------
575
+
577
576
(1 row)
578
577
579
578
UPDATE test.hash_rel SET value = 7 WHERE value = 6;
@@ -591,10 +590,10 @@ SELECT * FROM test.hash_rel WHERE value = 7;
591
590
6 | 7
592
591
(1 row)
593
592
594
- SELECT pathman.create_range_update_trigger ('test.num_range_rel');
595
- create_range_update_trigger
596
- ----------------------------------
597
- test.num_range_rel_upd_trig_func
593
+ SELECT pathman.create_update_triggers ('test.num_range_rel');
594
+ create_update_triggers
595
+ ------------------------
596
+
598
597
(1 row)
599
598
600
599
UPDATE test.num_range_rel SET id = 3001 WHERE id = 1;
@@ -1322,6 +1321,7 @@ EXPLAIN (COSTS OFF) SELECT * FROM test.range_rel WHERE dt BETWEEN '2014-11-15' A
1322
1321
(6 rows)
1323
1322
1324
1323
SELECT pathman.detach_range_partition('test.range_rel_archive');
1324
+ NOTICE: trigger "range_rel_upd_trig" for relation "test.range_rel_archive" does not exist, skipping
1325
1325
detach_range_partition
1326
1326
------------------------
1327
1327
test.range_rel_archive
@@ -1342,12 +1342,12 @@ CREATE TABLE test.range_rel_test1 (
1342
1342
txt TEXT,
1343
1343
abc INTEGER);
1344
1344
SELECT pathman.attach_range_partition('test.range_rel', 'test.range_rel_test1', '2013-01-01'::DATE, '2014-01-01'::DATE);
1345
- ERROR: partition must have the exact same structure as parent
1345
+ ERROR: partition must have a compatible tuple format
1346
1346
CREATE TABLE test.range_rel_test2 (
1347
1347
id SERIAL PRIMARY KEY,
1348
1348
dt TIMESTAMP);
1349
1349
SELECT pathman.attach_range_partition('test.range_rel', 'test.range_rel_test2', '2013-01-01'::DATE, '2014-01-01'::DATE);
1350
- ERROR: partition must have the exact same structure as parent
1350
+ ERROR: column "dt" in child table must be marked NOT NULL
1351
1351
/* Half open ranges */
1352
1352
SELECT pathman.add_range_partition('test.range_rel', NULL, '2014-12-01'::DATE, 'test.range_rel_minus_infinity');
1353
1353
add_range_partition
@@ -1477,7 +1477,7 @@ SELECT pathman.replace_hash_partition('test.hash_rel_0', 'test.hash_rel_extern')
1477
1477
Indexes:
1478
1478
"hash_rel_0_pkey" PRIMARY KEY, btree (id)
1479
1479
Triggers:
1480
- hash_rel_upd_trig BEFORE UPDATE ON test.hash_rel_0 FOR EACH ROW EXECUTE PROCEDURE test.hash_rel_upd_trig_func ()
1480
+ hash_rel_upd_trig BEFORE UPDATE OF value ON test.hash_rel_0 FOR EACH ROW EXECUTE PROCEDURE pathman.update_trigger_func ()
1481
1481
1482
1482
\d+ test.hash_rel_extern
1483
1483
Table "test.hash_rel_extern"
@@ -1499,7 +1499,7 @@ CREATE TABLE test.hash_rel_wrong(
1499
1499
id INTEGER NOT NULL,
1500
1500
value INTEGER);
1501
1501
SELECT pathman.replace_hash_partition('test.hash_rel_1', 'test.hash_rel_wrong');
1502
- ERROR: partition must have the exact same structure as parent
1502
+ ERROR: column "value" in child table must be marked NOT NULL
1503
1503
EXPLAIN (COSTS OFF) SELECT * FROM test.hash_rel;
1504
1504
QUERY PLAN
1505
1505
-----------------------------------
@@ -1513,7 +1513,6 @@ EXPLAIN (COSTS OFF) SELECT * FROM test.hash_rel;
1513
1513
* Clean up
1514
1514
*/
1515
1515
SELECT pathman.drop_partitions('test.hash_rel');
1516
- NOTICE: drop cascades to 2 other objects
1517
1516
NOTICE: 3 rows copied from test.hash_rel_1
1518
1517
NOTICE: 2 rows copied from test.hash_rel_2
1519
1518
NOTICE: 2 rows copied from test.hash_rel_extern
@@ -1535,7 +1534,6 @@ SELECT pathman.create_hash_partitions('test.hash_rel', 'value', 3);
1535
1534
(1 row)
1536
1535
1537
1536
SELECT pathman.drop_partitions('test.hash_rel', TRUE);
1538
- NOTICE: function test.hash_rel_upd_trig_func() does not exist, skipping
1539
1537
drop_partitions
1540
1538
-----------------
1541
1539
3
@@ -1549,7 +1547,6 @@ SELECT COUNT(*) FROM ONLY test.hash_rel;
1549
1547
1550
1548
DROP TABLE test.hash_rel CASCADE;
1551
1549
SELECT pathman.drop_partitions('test.num_range_rel');
1552
- NOTICE: drop cascades to 3 other objects
1553
1550
NOTICE: 998 rows copied from test.num_range_rel_1
1554
1551
NOTICE: 1000 rows copied from test.num_range_rel_2
1555
1552
NOTICE: 1000 rows copied from test.num_range_rel_3
@@ -1690,10 +1687,10 @@ SELECT * FROM test."TeSt";
1690
1687
1 | 1
1691
1688
(3 rows)
1692
1689
1693
- SELECT pathman.create_hash_update_trigger ('test."TeSt"');
1694
- create_hash_update_trigger
1695
- ----------------------------
1696
- test."TeSt_upd_trig_func"
1690
+ SELECT pathman.create_update_triggers ('test."TeSt"');
1691
+ create_update_triggers
1692
+ ------------------------
1693
+
1697
1694
(1 row)
1698
1695
1699
1696
UPDATE test."TeSt" SET a = 1;
@@ -1722,7 +1719,6 @@ EXPLAIN (COSTS OFF) SELECT * FROM test."TeSt" WHERE a = 1;
1722
1719
(3 rows)
1723
1720
1724
1721
SELECT pathman.drop_partitions('test."TeSt"');
1725
- NOTICE: drop cascades to 3 other objects
1726
1722
NOTICE: 0 rows copied from test."TeSt_0"
1727
1723
NOTICE: 0 rows copied from test."TeSt_1"
1728
1724
NOTICE: 3 rows copied from test."TeSt_2"
@@ -1739,6 +1735,7 @@ SELECT * FROM test."TeSt";
1739
1735
1 | 1
1740
1736
(3 rows)
1741
1737
1738
+ DROP TABLE test."TeSt" CASCADE;
1742
1739
CREATE TABLE test."RangeRel" (
1743
1740
id SERIAL PRIMARY KEY,
1744
1741
dt TIMESTAMP NOT NULL,
@@ -1777,7 +1774,6 @@ SELECT pathman.split_range_partition('test."RangeRel_1"', '2015-01-01'::DATE);
1777
1774
(1 row)
1778
1775
1779
1776
SELECT pathman.drop_partitions('test."RangeRel"');
1780
- NOTICE: function test.RangeRel_upd_trig_func() does not exist, skipping
1781
1777
NOTICE: 0 rows copied from test."RangeRel_1"
1782
1778
NOTICE: 1 rows copied from test."RangeRel_2"
1783
1779
NOTICE: 1 rows copied from test."RangeRel_3"
@@ -1813,7 +1809,6 @@ SELECT pathman.create_range_partitions('test."RangeRel"', 'id', 1, 100, 3);
1813
1809
(1 row)
1814
1810
1815
1811
SELECT pathman.drop_partitions('test."RangeRel"');
1816
- NOTICE: function test.RangeRel_upd_trig_func() does not exist, skipping
1817
1812
NOTICE: 0 rows copied from test."RangeRel_1"
1818
1813
NOTICE: 0 rows copied from test."RangeRel_2"
1819
1814
NOTICE: 0 rows copied from test."RangeRel_3"
@@ -1971,7 +1966,6 @@ EXPLAIN (COSTS OFF) DELETE FROM test.range_rel r USING test.tmp t WHERE r.dt = '
1971
1966
DELETE FROM test.range_rel r USING test.tmp t WHERE r.dt = '2010-01-02' AND r.id = t.id;
1972
1967
/* Create range partitions from whole range */
1973
1968
SELECT drop_partitions('test.range_rel');
1974
- NOTICE: function test.range_rel_upd_trig_func() does not exist, skipping
1975
1969
NOTICE: 44 rows copied from test.range_rel_1
1976
1970
NOTICE: 31 rows copied from test.range_rel_3
1977
1971
NOTICE: 30 rows copied from test.range_rel_4
@@ -1998,7 +1992,6 @@ SELECT create_partitions_from_range('test.range_rel', 'id', 1, 1000, 100);
1998
1992
(1 row)
1999
1993
2000
1994
SELECT drop_partitions('test.range_rel', TRUE);
2001
- NOTICE: function test.range_rel_upd_trig_func() does not exist, skipping
2002
1995
drop_partitions
2003
1996
-----------------
2004
1997
10
@@ -2198,6 +2191,6 @@ ORDER BY partition;
2198
2191
DROP TABLE test.provided_part_names CASCADE;
2199
2192
NOTICE: drop cascades to 2 other objects
2200
2193
DROP SCHEMA test CASCADE;
2201
- NOTICE: drop cascades to 49 other objects
2194
+ NOTICE: drop cascades to 48 other objects
2202
2195
DROP EXTENSION pg_pathman CASCADE;
2203
2196
DROP SCHEMA pathman CASCADE;
0 commit comments