Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb80e7ac

Browse files
committed
Merge branch 'rel_1_4_trigger' into rel_future_strings
2 parents540eb01 +1f44854 commitb80e7ac

16 files changed

+466
-323
lines changed

‎expected/pathman_basic.out

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ SELECT * FROM test.hash_rel;
8181
(3 rows)
8282

8383
SELECT pathman.drop_partitions('test.hash_rel');
84-
NOTICE: function test.hash_rel_upd_trig_func() does not exist, skipping
8584
NOTICE: 0 rows copied from test.hash_rel_0
8685
NOTICE: 0 rows copied from test.hash_rel_1
8786
NOTICE: 0 rows copied from test.hash_rel_2
@@ -570,10 +569,10 @@ SET pg_pathman.enable_runtimeappend = OFF;
570569
SET pg_pathman.enable_runtimemergeappend = OFF;
571570
VACUUM;
572571
/* 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+
577576
(1 row)
578577

579578
UPDATE test.hash_rel SET value = 7 WHERE value = 6;
@@ -591,10 +590,10 @@ SELECT * FROM test.hash_rel WHERE value = 7;
591590
6 | 7
592591
(1 row)
593592

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+
598597
(1 row)
599598

600599
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
13221321
(6 rows)
13231322

13241323
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
13251325
detach_range_partition
13261326
------------------------
13271327
test.range_rel_archive
@@ -1342,12 +1342,12 @@ CREATE TABLE test.range_rel_test1 (
13421342
txt TEXT,
13431343
abc INTEGER);
13441344
SELECT pathman.attach_range_partition('test.range_rel', 'test.range_rel_test1', '2013-01-01'::DATE, '2014-01-01'::DATE);
1345-
ERROR: partition must havethe exact same structure as parent
1345+
ERROR: partition must havea compatible tuple format
13461346
CREATE TABLE test.range_rel_test2 (
13471347
id SERIAL PRIMARY KEY,
13481348
dt TIMESTAMP);
13491349
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
13511351
/* Half open ranges */
13521352
SELECT pathman.add_range_partition('test.range_rel', NULL, '2014-12-01'::DATE, 'test.range_rel_minus_infinity');
13531353
add_range_partition
@@ -1477,7 +1477,7 @@ SELECT pathman.replace_hash_partition('test.hash_rel_0', 'test.hash_rel_extern')
14771477
Indexes:
14781478
"hash_rel_0_pkey" PRIMARY KEY, btree (id)
14791479
Triggers:
1480-
hash_rel_upd_trig BEFORE UPDATE ON test.hash_rel_0 FOR EACH ROW EXECUTE PROCEDUREtest.hash_rel_upd_trig_func()
1480+
hash_rel_upd_trig BEFORE UPDATEOF valueON test.hash_rel_0 FOR EACH ROW EXECUTE PROCEDUREpathman.update_trigger_func()
14811481

14821482
\d+ test.hash_rel_extern
14831483
Table "test.hash_rel_extern"
@@ -1499,7 +1499,7 @@ CREATE TABLE test.hash_rel_wrong(
14991499
idINTEGER NOT NULL,
15001500
valueINTEGER);
15011501
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
15031503
EXPLAIN (COSTS OFF) SELECT * FROM test.hash_rel;
15041504
QUERY PLAN
15051505
-----------------------------------
@@ -1513,7 +1513,6 @@ EXPLAIN (COSTS OFF) SELECT * FROM test.hash_rel;
15131513
* Clean up
15141514
*/
15151515
SELECT pathman.drop_partitions('test.hash_rel');
1516-
NOTICE: drop cascades to 2 other objects
15171516
NOTICE: 3 rows copied from test.hash_rel_1
15181517
NOTICE: 2 rows copied from test.hash_rel_2
15191518
NOTICE: 2 rows copied from test.hash_rel_extern
@@ -1535,7 +1534,6 @@ SELECT pathman.create_hash_partitions('test.hash_rel', 'value', 3);
15351534
(1 row)
15361535

15371536
SELECT pathman.drop_partitions('test.hash_rel', TRUE);
1538-
NOTICE: function test.hash_rel_upd_trig_func() does not exist, skipping
15391537
drop_partitions
15401538
-----------------
15411539
3
@@ -1549,7 +1547,6 @@ SELECT COUNT(*) FROM ONLY test.hash_rel;
15491547

15501548
DROP TABLE test.hash_rel CASCADE;
15511549
SELECT pathman.drop_partitions('test.num_range_rel');
1552-
NOTICE: drop cascades to 3 other objects
15531550
NOTICE: 998 rows copied from test.num_range_rel_1
15541551
NOTICE: 1000 rows copied from test.num_range_rel_2
15551552
NOTICE: 1000 rows copied from test.num_range_rel_3
@@ -1690,10 +1687,10 @@ SELECT * FROM test."TeSt";
16901687
1 | 1
16911688
(3 rows)
16921689

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+
16971694
(1 row)
16981695

16991696
UPDATE test."TeSt" SET a = 1;
@@ -1722,7 +1719,6 @@ EXPLAIN (COSTS OFF) SELECT * FROM test."TeSt" WHERE a = 1;
17221719
(3 rows)
17231720

17241721
SELECT pathman.drop_partitions('test."TeSt"');
1725-
NOTICE: drop cascades to 3 other objects
17261722
NOTICE: 0 rows copied from test."TeSt_0"
17271723
NOTICE: 0 rows copied from test."TeSt_1"
17281724
NOTICE: 3 rows copied from test."TeSt_2"
@@ -1739,6 +1735,7 @@ SELECT * FROM test."TeSt";
17391735
1 | 1
17401736
(3 rows)
17411737

1738+
DROP TABLE test."TeSt" CASCADE;
17421739
CREATE TABLE test."RangeRel" (
17431740
idSERIAL PRIMARY KEY,
17441741
dtTIMESTAMP NOT NULL,
@@ -1777,7 +1774,6 @@ SELECT pathman.split_range_partition('test."RangeRel_1"', '2015-01-01'::DATE);
17771774
(1 row)
17781775

17791776
SELECT pathman.drop_partitions('test."RangeRel"');
1780-
NOTICE: function test.RangeRel_upd_trig_func() does not exist, skipping
17811777
NOTICE: 0 rows copied from test."RangeRel_1"
17821778
NOTICE: 1 rows copied from test."RangeRel_2"
17831779
NOTICE: 1 rows copied from test."RangeRel_3"
@@ -1813,7 +1809,6 @@ SELECT pathman.create_range_partitions('test."RangeRel"', 'id', 1, 100, 3);
18131809
(1 row)
18141810

18151811
SELECT pathman.drop_partitions('test."RangeRel"');
1816-
NOTICE: function test.RangeRel_upd_trig_func() does not exist, skipping
18171812
NOTICE: 0 rows copied from test."RangeRel_1"
18181813
NOTICE: 0 rows copied from test."RangeRel_2"
18191814
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 = '
19711966
DELETE FROM test.range_rel r USING test.tmp t WHERE r.dt = '2010-01-02' AND r.id = t.id;
19721967
/* Create range partitions from whole range */
19731968
SELECT drop_partitions('test.range_rel');
1974-
NOTICE: function test.range_rel_upd_trig_func() does not exist, skipping
19751969
NOTICE: 44 rows copied from test.range_rel_1
19761970
NOTICE: 31 rows copied from test.range_rel_3
19771971
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);
19981992
(1 row)
19991993

20001994
SELECT drop_partitions('test.range_rel', TRUE);
2001-
NOTICE: function test.range_rel_upd_trig_func() does not exist, skipping
20021995
drop_partitions
20031996
-----------------
20041997
10
@@ -2198,6 +2191,6 @@ ORDER BY partition;
21982191
DROP TABLE test.provided_part_names CASCADE;
21992192
NOTICE: drop cascades to 2 other objects
22002193
DROP SCHEMA test CASCADE;
2201-
NOTICE: drop cascades to49 other objects
2194+
NOTICE: drop cascades to48 other objects
22022195
DROP EXTENSION pg_pathman CASCADE;
22032196
DROP SCHEMA pathman CASCADE;

‎expected/pathman_calamity.out

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ NOTICE: sequence "part_test_seq" does not exist, skipping
2828
(1 row)
2929

3030
SELECT drop_partitions('calamity.part_test');
31-
NOTICE: function calamity.part_test_upd_trig_func() does not exist, skipping
3231
NOTICE: 10 rows copied from calamity.part_test_1
3332
NOTICE: 10 rows copied from calamity.part_test_2
3433
NOTICE: 10 rows copied from calamity.part_test_3
@@ -44,7 +43,6 @@ SELECT create_range_partitions('calamity.part_test', 'val', 1, 10);
4443
(1 row)
4544

4645
SELECT drop_partitions('calamity.part_test');
47-
NOTICE: function calamity.part_test_upd_trig_func() does not exist, skipping
4846
NOTICE: 10 rows copied from calamity.part_test_1
4947
NOTICE: 10 rows copied from calamity.part_test_2
5048
NOTICE: 10 rows copied from calamity.part_test_3
@@ -66,7 +64,6 @@ SELECT append_range_partition('calamity.part_test');
6664
(1 row)
6765

6866
SELECT drop_partitions('calamity.part_test');
69-
NOTICE: function calamity.part_test_upd_trig_func() does not exist, skipping
7067
NOTICE: 10 rows copied from calamity.part_test_1
7168
NOTICE: 10 rows copied from calamity.part_test_2
7269
NOTICE: 10 rows copied from calamity.part_test_3
@@ -89,7 +86,6 @@ SELECT append_range_partition('calamity.part_test');
8986
(1 row)
9087

9188
SELECT drop_partitions('calamity.part_test');
92-
NOTICE: function calamity.part_test_upd_trig_func() does not exist, skipping
9389
NOTICE: 10 rows copied from calamity.part_test_1
9490
NOTICE: 10 rows copied from calamity.part_test_2
9591
NOTICE: 10 rows copied from calamity.part_test_3
@@ -171,7 +167,6 @@ EXPLAIN (COSTS OFF) SELECT * FROM calamity.part_test;
171167
(5 rows)
172168

173169
SELECT drop_partitions('calamity.part_test', true);
174-
NOTICE: function calamity.part_test_upd_trig_func() does not exist, skipping
175170
drop_partitions
176171
-----------------
177172
4
@@ -199,7 +194,6 @@ ERROR: invalid input syntax for integer: "15.6"
199194
SELECT set_interval('calamity.part_test', 'abc'::text);/* not ok */
200195
ERROR: invalid input syntax for integer: "abc"
201196
SELECT drop_partitions('calamity.part_test', true);
202-
NOTICE: function calamity.part_test_upd_trig_func() does not exist, skipping
203197
drop_partitions
204198
-----------------
205199
3
@@ -479,7 +473,6 @@ SELECT add_to_pathman_config('calamity.part_test', 'val');/* OK */
479473
(1 row)
480474

481475
SELECT disable_pathman_for('calamity.part_test');
482-
NOTICE: function calamity.part_test_upd_trig_func() does not exist, skipping
483476
disable_pathman_for
484477
---------------------
485478

@@ -492,7 +485,6 @@ SELECT add_to_pathman_config('calamity.part_test', 'val', '10'); /* OK */
492485
(1 row)
493486

494487
SELECT disable_pathman_for('calamity.part_test');
495-
NOTICE: function calamity.part_test_upd_trig_func() does not exist, skipping
496488
disable_pathman_for
497489
---------------------
498490

@@ -599,7 +591,6 @@ SELECT set_enable_parent('calamity.to_be_disabled', true); /* add row to params
599591
(1 row)
600592

601593
SELECT disable_pathman_for('calamity.to_be_disabled'); /* should delete both rows */
602-
NOTICE: function calamity.to_be_disabled_upd_trig_func() does not exist, skipping
603594
disable_pathman_for
604595
---------------------
605596

‎expected/pathman_callbacks.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ WARNING: callback arg: {"parent": "abc", "parttype": "2", "partition": "abc_7",
133133
(1 row)
134134

135135
SELECT drop_partitions('callbacks.abc');
136-
NOTICE: function callbacks.abc_upd_trig_func() does not exist, skipping
137136
NOTICE: 0 rows copied from callbacks.abc_1
138137
NOTICE: 1 rows copied from callbacks.abc_2
139138
NOTICE: 1 rows copied from callbacks.abc_3

‎expected/pathman_cte.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ WHERE t.id = tmp.tid AND t.pdate = tmp.pdate AND tmp.test_mode > 0;
121121
(24 rows)
122122

123123
SELECT drop_partitions('test_cte.cte_del_xacts'); /* now drop partitions */
124-
NOTICE: function test_cte.cte_del_xacts_upd_trig_func() does not exist, skipping
125124
NOTICE: 50 rows copied from test_cte.cte_del_xacts_1
126125
NOTICE: 50 rows copied from test_cte.cte_del_xacts_2
127126
drop_partitions

‎expected/pathman_domains.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ ORDER BY range_min::INT, range_max::INT;
8888
(14 rows)
8989

9090
SELECT drop_partitions('domains.dom_table');
91-
NOTICE: function domains.dom_table_upd_trig_func() does not exist, skipping
9291
NOTICE: 49 rows copied from domains.dom_table_1
9392
NOTICE: 100 rows copied from domains.dom_table_3
9493
NOTICE: 100 rows copied from domains.dom_table_4

‎expected/pathman_foreign_keys.out

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ INSERT INTO fkeys.test_fkey VALUES(1, 'wrong');
2020
ERROR: insert or update on table "test_fkey_1" violates foreign key constraint "test_fkey_1_comment_fkey"
2121
INSERT INTO fkeys.test_fkey VALUES(1, 'test');
2222
SELECT drop_partitions('fkeys.test_fkey');
23-
NOTICE: function fkeys.test_fkey_upd_trig_func() does not exist, skipping
2423
NOTICE: 101 rows copied from fkeys.test_fkey_1
2524
NOTICE: 100 rows copied from fkeys.test_fkey_2
2625
NOTICE: 100 rows copied from fkeys.test_fkey_3
@@ -46,7 +45,6 @@ INSERT INTO fkeys.test_fkey VALUES(1, 'wrong');
4645
ERROR: insert or update on table "test_fkey_0" violates foreign key constraint "test_fkey_0_comment_fkey"
4746
INSERT INTO fkeys.test_fkey VALUES(1, 'test');
4847
SELECT drop_partitions('fkeys.test_fkey');
49-
NOTICE: function fkeys.test_fkey_upd_trig_func() does not exist, skipping
5048
NOTICE: 100 rows copied from fkeys.test_fkey_0
5149
NOTICE: 90 rows copied from fkeys.test_fkey_1
5250
NOTICE: 90 rows copied from fkeys.test_fkey_2

‎expected/pathman_permissions.out

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ ERROR: no suitable partition for key '55'
134134
/* Finally drop partitions */
135135
SET ROLE user1;
136136
SELECT drop_partitions('permissions.user1_table');
137-
NOTICE: function permissions.user1_table_upd_trig_func() does not exist, skipping
138137
NOTICE: 10 rows copied from permissions.user1_table_1
139138
NOTICE: 10 rows copied from permissions.user1_table_2
140139
NOTICE: 0 rows copied from permissions.user1_table_4
@@ -157,7 +156,6 @@ SELECT create_hash_partitions('permissions.user2_table', 'id', 3);
157156

158157
INSERT INTO permissions.user2_table SELECT generate_series(1, 30);
159158
SELECT drop_partitions('permissions.user2_table');
160-
NOTICE: function permissions.user2_table_upd_trig_func() does not exist, skipping
161159
NOTICE: 9 rows copied from permissions.user2_table_0
162160
NOTICE: 11 rows copied from permissions.user2_table_1
163161
NOTICE: 10 rows copied from permissions.user2_table_2

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp