Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 82507b6

Browse files
committed
use DEPENDENCY_NORMAL instead of DEPENDENCY_AUTO (requires DROP CASCADE, but fixes pg_dump)
1 parent 5ff467b commit 82507b6

16 files changed

+42
-42
lines changed

expected/pathman_basic.out

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ EXPLAIN (COSTS OFF) SELECT * FROM test.improved_dummy WHERE id = 101 OR id = 5 A
257257
(5 rows)
258258

259259
DROP TABLE test.improved_dummy CASCADE;
260-
NOTICE: drop cascades to 11 other objects
260+
NOTICE: drop cascades to 12 other objects
261261
/* since rel_1_4_beta: check create_range_partitions(bounds array) */
262262
CREATE TABLE test.improved_dummy (val INT NOT NULL);
263263
SELECT pathman.create_range_partitions('test.improved_dummy', 'val',
@@ -328,7 +328,7 @@ ORDER BY partition;
328328
(2 rows)
329329

330330
DROP TABLE test.improved_dummy CASCADE;
331-
NOTICE: drop cascades to 2 other objects
331+
NOTICE: drop cascades to 3 other objects
332332
/* Test pathman_rel_pathlist_hook() with INSERT query */
333333
CREATE TABLE test.insert_into_select(val int NOT NULL);
334334
INSERT INTO test.insert_into_select SELECT generate_series(1, 100);
@@ -385,7 +385,7 @@ SELECT count(*) FROM test.insert_into_select_copy;
385385
(1 row)
386386

387387
DROP TABLE test.insert_into_select_copy, test.insert_into_select CASCADE;
388-
NOTICE: drop cascades to 5 other objects
388+
NOTICE: drop cascades to 6 other objects
389389
/* Test INSERT hooking with DATE type */
390390
CREATE TABLE test.insert_date_test(val DATE NOT NULL);
391391
SELECT pathman.create_partitions_from_range('test.insert_date_test', 'val',
@@ -429,7 +429,7 @@ SELECT max(val) FROM test.insert_date_test; /* check last date */
429429
(1 row)
430430

431431
DROP TABLE test.insert_date_test CASCADE;
432-
NOTICE: drop cascades to 8 other objects
432+
NOTICE: drop cascades to 9 other objects
433433
SET pg_pathman.enable_runtimeappend = OFF;
434434
SET pg_pathman.enable_runtimemergeappend = OFF;
435435
VACUUM;
@@ -1454,7 +1454,7 @@ SELECT pathman.split_range_partition('test.zero_50', 60, 'test.zero_60');
14541454
(1 row)
14551455

14561456
DROP TABLE test.zero CASCADE;
1457-
NOTICE: drop cascades to 4 other objects
1457+
NOTICE: drop cascades to 5 other objects
14581458
/*
14591459
* Check that altering table columns doesn't break trigger
14601460
*/
@@ -1562,7 +1562,7 @@ NOTICE: 1000 rows copied from test.num_range_rel_3
15621562

15631563
DROP TABLE test.num_range_rel CASCADE;
15641564
DROP TABLE test.range_rel CASCADE;
1565-
NOTICE: drop cascades to 9 other objects
1565+
NOTICE: drop cascades to 10 other objects
15661566
/* Test automatic partition creation */
15671567
CREATE TABLE test.range_rel (
15681568
id SERIAL PRIMARY KEY,
@@ -1633,7 +1633,7 @@ SELECT * FROM pathman.pathman_config;
16331633
(1 row)
16341634

16351635
DROP TABLE test.range_rel CASCADE;
1636-
NOTICE: drop cascades to 20 other objects
1636+
NOTICE: drop cascades to 21 other objects
16371637
SELECT * FROM pathman.pathman_config;
16381638
partrel | expr | parttype | range_interval | cooked_expr
16391639
---------+------+----------+----------------+-------------
@@ -1795,7 +1795,7 @@ SELECT pathman.create_partitions_from_range('test."RangeRel"', 'dt', '2015-01-01
17951795
(1 row)
17961796

17971797
DROP TABLE test."RangeRel" CASCADE;
1798-
NOTICE: drop cascades to 5 other objects
1798+
NOTICE: drop cascades to 6 other objects
17991799
SELECT * FROM pathman.pathman_config;
18001800
partrel | expr | parttype | range_interval | cooked_expr
18011801
--------------------+------+----------+----------------+------------------------------------------------------------------------------------------------------------------------
@@ -1828,7 +1828,7 @@ SELECT pathman.create_partitions_from_range('test."RangeRel"', 'id', 1, 300, 100
18281828
(1 row)
18291829

18301830
DROP TABLE test."RangeRel" CASCADE;
1831-
NOTICE: drop cascades to 3 other objects
1831+
NOTICE: drop cascades to 4 other objects
18321832
DROP EXTENSION pg_pathman;
18331833
/* Test that everything works fine without schemas */
18341834
CREATE EXTENSION pg_pathman;
@@ -2193,6 +2193,6 @@ ORDER BY partition;
21932193
DROP TABLE test.provided_part_names CASCADE;
21942194
NOTICE: drop cascades to 2 other objects
21952195
DROP SCHEMA test CASCADE;
2196-
NOTICE: drop cascades to 38 other objects
2196+
NOTICE: drop cascades to 42 other objects
21972197
DROP EXTENSION pg_pathman CASCADE;
21982198
DROP SCHEMA pathman CASCADE;

expected/pathman_bgw.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ SELECT * FROM pathman_partition_list ORDER BY partition; /* should contain 3 par
2929
(3 rows)
3030

3131
DROP TABLE test_bgw.test_1 CASCADE;
32-
NOTICE: drop cascades to 3 other objects
32+
NOTICE: drop cascades to 4 other objects
3333
/* int8, size of Datum == 8 */
3434
CREATE TABLE test_bgw.test_2(val INT8 NOT NULL);
3535
SELECT create_range_partitions('test_bgw.test_2', 'val', 1, 5, 2);
@@ -54,7 +54,7 @@ SELECT * FROM pathman_partition_list ORDER BY partition; /* should contain 3 par
5454
(3 rows)
5555

5656
DROP TABLE test_bgw.test_2 CASCADE;
57-
NOTICE: drop cascades to 3 other objects
57+
NOTICE: drop cascades to 4 other objects
5858
/* numeric, size of Datum == var */
5959
CREATE TABLE test_bgw.test_3(val NUMERIC NOT NULL);
6060
SELECT create_range_partitions('test_bgw.test_3', 'val', 1, 5, 2);
@@ -79,7 +79,7 @@ SELECT * FROM pathman_partition_list ORDER BY partition; /* should contain 3 par
7979
(3 rows)
8080

8181
DROP TABLE test_bgw.test_3 CASCADE;
82-
NOTICE: drop cascades to 3 other objects
82+
NOTICE: drop cascades to 4 other objects
8383
/* date, size of Datum == var */
8484
CREATE TABLE test_bgw.test_4(val DATE NOT NULL);
8585
SELECT create_range_partitions('test_bgw.test_4', 'val', '20170213'::date, '1 day'::interval, 2);
@@ -104,6 +104,6 @@ SELECT * FROM pathman_partition_list ORDER BY partition; /* should contain 3 par
104104
(3 rows)
105105

106106
DROP TABLE test_bgw.test_4 CASCADE;
107-
NOTICE: drop cascades to 3 other objects
107+
NOTICE: drop cascades to 4 other objects
108108
DROP SCHEMA test_bgw CASCADE;
109109
DROP EXTENSION pg_pathman;

expected/pathman_calamity.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ SELECT get_part_range('calamity.test_range_idx', 0, NULL::INT4); /* OK */
725725
(1 row)
726726

727727
DROP TABLE calamity.test_range_idx CASCADE;
728-
NOTICE: drop cascades to table calamity.test_range_idx_1
728+
NOTICE: drop cascades to 2 other objects
729729
/* check function get_part_range_by_oid() */
730730
CREATE TABLE calamity.test_range_oid(val INT4 NOT NULL);
731731
SELECT create_range_partitions('calamity.test_range_oid', 'val', 1, 10, 1);
@@ -747,7 +747,7 @@ SELECT get_part_range('calamity.test_range_oid_1', NULL::INT4); /* OK */
747747
(1 row)
748748

749749
DROP TABLE calamity.test_range_oid CASCADE;
750-
NOTICE: drop cascades to table calamity.test_range_oid_1
750+
NOTICE: drop cascades to 2 other objects
751751
/* check function merge_range_partitions() */
752752
SELECT merge_range_partitions('{pg_class}'); /* not ok */
753753
ERROR: cannot merge partitions
@@ -771,7 +771,7 @@ SELECT merge_range_partitions('{calamity.merge_test_a_1,
771771
calamity.merge_test_b_1}'); /* not ok */
772772
ERROR: cannot merge partitions
773773
DROP TABLE calamity.merge_test_a,calamity.merge_test_b CASCADE;
774-
NOTICE: drop cascades to 4 other objects
774+
NOTICE: drop cascades to 6 other objects
775775
/* check function drop_triggers() */
776776
CREATE TABLE calamity.trig_test_tbl(val INT4 NOT NULL);
777777
SELECT create_hash_partitions('calamity.trig_test_tbl', 'val', 2);
@@ -990,6 +990,6 @@ EXPLAIN (COSTS OFF) SELECT * FROM calamity.survivor; /* OK */
990990
(3 rows)
991991

992992
DROP TABLE calamity.survivor CASCADE;
993-
NOTICE: drop cascades to 2 other objects
993+
NOTICE: drop cascades to 3 other objects
994994
DROP SCHEMA calamity CASCADE;
995995
DROP EXTENSION pg_pathman;

expected/pathman_callbacks.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ WHERE partrel = 'callbacks.abc'::REGCLASS;
6666
(1 row)
6767

6868
DROP TABLE callbacks.abc CASCADE;
69-
NOTICE: drop cascades to 2 other objects
69+
NOTICE: drop cascades to 3 other objects
7070
/* set callback to be called on RANGE partitions */
7171
CREATE TABLE callbacks.abc(a serial, b int);
7272
SELECT create_range_partitions('callbacks.abc', 'a', 1, 100, 2);
@@ -196,7 +196,7 @@ $$ language plpgsql;
196196
INSERT INTO callbacks.abc VALUES (301, 0); /* +1 new partition */
197197
WARNING: callback arg: {"parent": "abc", "parttype": "2", "partition": "abc_5", "range_max": "401", "range_min": "301", "parent_schema": "callbacks", "partition_schema": "callbacks"}
198198
DROP TABLE callbacks.abc CASCADE;
199-
NOTICE: drop cascades to 4 other objects
199+
NOTICE: drop cascades to 5 other objects
200200
/* more complex test using rotation of tables */
201201
CREATE TABLE callbacks.abc(a INT4 NOT NULL);
202202
INSERT INTO callbacks.abc
@@ -413,7 +413,7 @@ ORDER BY range_min::INT4;
413413
(4 rows)
414414

415415
DROP TABLE callbacks.abc CASCADE;
416-
NOTICE: drop cascades to 4 other objects
416+
NOTICE: drop cascades to 5 other objects
417417
DROP SCHEMA callbacks CASCADE;
418418
NOTICE: drop cascades to 2 other objects
419419
DROP EXTENSION pg_pathman CASCADE;

expected/pathman_cte.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ SELECT * FROM ttt;
3333
(6 rows)
3434

3535
DROP TABLE test_cte.range_rel CASCADE;
36-
NOTICE: drop cascades to 4 other objects
36+
NOTICE: drop cascades to 5 other objects
3737
CREATE TABLE test_cte.hash_rel (
3838
id INT4,
3939
value INTEGER NOT NULL);
@@ -225,7 +225,7 @@ SELECT * FROM test_cte.cte_del_xacts t JOIN tmp ON t.id = tmp.tid;
225225

226226
DROP FUNCTION test_cte.cte_del_xacts_stab(TEXT);
227227
DROP TABLE test_cte.cte_del_xacts, test_cte.cte_del_xacts_specdata CASCADE;
228-
NOTICE: drop cascades to table test_cte.cte_del_xacts_1
228+
NOTICE: drop cascades to 2 other objects
229229
/* Test recursive CTE */
230230
CREATE TABLE test_cte.recursive_cte_test_tbl(id INT NOT NULL, name TEXT NOT NULL);
231231
SELECT create_hash_partitions('test_cte.recursive_cte_test_tbl', 'id', 2);

expected/pathman_expressions.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,5 @@ SELECT COUNT(*) FROM test_exprs.range_rel_2;
151151
(1 row)
152152

153153
DROP SCHEMA test_exprs CASCADE;
154-
NOTICE: drop cascades to 16 other objects
154+
NOTICE: drop cascades to 17 other objects
155155
DROP EXTENSION pg_pathman;

expected/pathman_foreign_keys.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ EXPLAIN (COSTS OFF) SELECT * FROM fkeys.messages;
8888
(3 rows)
8989

9090
DROP TABLE fkeys.messages, fkeys.replies CASCADE;
91-
NOTICE: drop cascades to 2 other objects
91+
NOTICE: drop cascades to 3 other objects
9292
DROP SCHEMA fkeys CASCADE;
9393
NOTICE: drop cascades to 2 other objects
9494
DROP EXTENSION pg_pathman CASCADE;

expected/pathman_inserts.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ DROP TABLE test_inserts.test_gap_2; /* make a gap */
866866
INSERT INTO test_inserts.test_gap VALUES(15); /* not ok */
867867
ERROR: cannot spawn a partition
868868
DROP TABLE test_inserts.test_gap CASCADE;
869-
NOTICE: drop cascades to 2 other objects
869+
NOTICE: drop cascades to 3 other objects
870870
DROP SCHEMA test_inserts CASCADE;
871-
NOTICE: drop cascades to 18 other objects
871+
NOTICE: drop cascades to 19 other objects
872872
DROP EXTENSION pg_pathman CASCADE;

expected/pathman_interval.out

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ SELECT partrel, range_interval FROM pathman_config;
4343
(1 row)
4444

4545
DROP TABLE test_interval.abc CASCADE;
46-
NOTICE: drop cascades to 3 other objects
46+
NOTICE: drop cascades to 4 other objects
4747
/* Range partitions for INT4 type */
4848
CREATE TABLE test_interval.abc (id INT4 NOT NULL);
4949
SELECT create_range_partitions('test_interval.abc', 'id', 0, 100, 2);
@@ -86,7 +86,7 @@ SELECT partrel, range_interval FROM pathman_config;
8686
(1 row)
8787

8888
DROP TABLE test_interval.abc CASCADE;
89-
NOTICE: drop cascades to 3 other objects
89+
NOTICE: drop cascades to 4 other objects
9090
/* Range partitions for INT8 type */
9191
CREATE TABLE test_interval.abc (id INT8 NOT NULL);
9292
SELECT create_range_partitions('test_interval.abc', 'id', 0, 100, 2);
@@ -129,7 +129,7 @@ SELECT partrel, range_interval FROM pathman_config;
129129
(1 row)
130130

131131
DROP TABLE test_interval.abc CASCADE;
132-
NOTICE: drop cascades to 3 other objects
132+
NOTICE: drop cascades to 4 other objects
133133
/* Range partitions for DATE type */
134134
CREATE TABLE test_interval.abc (dt DATE NOT NULL);
135135
SELECT create_range_partitions('test_interval.abc', 'dt',
@@ -162,7 +162,7 @@ SELECT partrel, range_interval FROM pathman_config;
162162
(1 row)
163163

164164
DROP TABLE test_interval.abc CASCADE;
165-
NOTICE: drop cascades to 2 other objects
165+
NOTICE: drop cascades to 3 other objects
166166
/* Range partitions for FLOAT4 type */
167167
CREATE TABLE test_interval.abc (x FLOAT4 NOT NULL);
168168
SELECT create_range_partitions('test_interval.abc', 'x', 0, 100, 2);
@@ -194,7 +194,7 @@ SELECT set_interval('test_interval.abc', 100);
194194
(1 row)
195195

196196
DROP TABLE test_interval.abc CASCADE;
197-
NOTICE: drop cascades to 2 other objects
197+
NOTICE: drop cascades to 3 other objects
198198
/* Range partitions for FLOAT8 type */
199199
CREATE TABLE test_interval.abc (x FLOAT8 NOT NULL);
200200
SELECT create_range_partitions('test_interval.abc', 'x', 0, 100, 2);
@@ -226,7 +226,7 @@ SELECT set_interval('test_interval.abc', 100);
226226
(1 row)
227227

228228
DROP TABLE test_interval.abc CASCADE;
229-
NOTICE: drop cascades to 2 other objects
229+
NOTICE: drop cascades to 3 other objects
230230
/* Range partitions for NUMERIC type */
231231
CREATE TABLE test_interval.abc (x NUMERIC NOT NULL);
232232
SELECT create_range_partitions('test_interval.abc', 'x', 0, 100, 2);
@@ -255,7 +255,7 @@ SELECT set_interval('test_interval.abc', 100);
255255
(1 row)
256256

257257
DROP TABLE test_interval.abc CASCADE;
258-
NOTICE: drop cascades to 2 other objects
258+
NOTICE: drop cascades to 3 other objects
259259
/* Hash partitioned table shouldn't accept any interval value */
260260
CREATE TABLE test_interval.abc (id SERIAL);
261261
SELECT create_hash_partitions('test_interval.abc', 'id', 3);

expected/pathman_only.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,5 +238,5 @@ WHERE val = (SELECT val FROM ONLY test_only.from_only_test
238238
(27 rows)
239239

240240
DROP SCHEMA test_only CASCADE;
241-
NOTICE: drop cascades to 11 other objects
241+
NOTICE: drop cascades to 12 other objects
242242
DROP EXTENSION pg_pathman;

expected/pathman_permissions.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ ORDER BY attrelid::regclass::text; /* check ACL for each column (+1 partition) *
227227
(5 rows)
228228

229229
DROP TABLE permissions.dropped_column CASCADE;
230-
NOTICE: drop cascades to 5 other objects
230+
NOTICE: drop cascades to 6 other objects
231231
/* Finally reset user */
232232
RESET ROLE;
233233
DROP OWNED BY user1;

expected/pathman_runtime_nodes.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,6 @@ where id = any (select generate_series(-10, -1)); /* should be empty */
408408
set enable_hashjoin = on;
409409
set enable_mergejoin = on;
410410
DROP SCHEMA test CASCADE;
411-
NOTICE: drop cascades to 36 other objects
411+
NOTICE: drop cascades to 37 other objects
412412
DROP EXTENSION pg_pathman CASCADE;
413413
DROP SCHEMA pathman CASCADE;

expected/pathman_update_trigger.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,5 +285,5 @@ SELECT count(*) FROM test_update_trigger.test_hash;
285285
(1 row)
286286

287287
DROP SCHEMA test_update_trigger CASCADE;
288-
NOTICE: drop cascades to 17 other objects
288+
NOTICE: drop cascades to 18 other objects
289289
DROP EXTENSION pg_pathman;

expected/pathman_updates.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ UPDATE test_updates.test SET b = 0 WHERE val = 101 RETURNING *, tableoid::REGCLA
5959
(1 row)
6060

6161
DROP SCHEMA test_updates CASCADE;
62-
NOTICE: drop cascades to 12 other objects
62+
NOTICE: drop cascades to 13 other objects
6363
DROP EXTENSION pg_pathman;

expected/pathman_utility_stmt.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ SELECT *, tableoid::REGCLASS FROM copy_stmt_hooking.test ORDER BY val;
224224

225225
/* drop modified table */
226226
DROP TABLE copy_stmt_hooking.test CASCADE;
227-
NOTICE: drop cascades to 6 other objects
227+
NOTICE: drop cascades to 7 other objects
228228
/* create table again */
229229
CREATE TABLE copy_stmt_hooking.test(
230230
val int not null,
@@ -280,7 +280,7 @@ SELECT COUNT(*) FROM copy_stmt_hooking.test2;
280280
(1 row)
281281

282282
DROP SCHEMA copy_stmt_hooking CASCADE;
283-
NOTICE: drop cascades to 796 other objects
283+
NOTICE: drop cascades to 797 other objects
284284
/*
285285
* Test auto check constraint renaming
286286
*/

src/pl_funcs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ add_to_pathman_config(PG_FUNCTION_ARGS)
884884
ObjectAddressSet(sequence, RelationRelationId, naming_seq);
885885

886886
/* Now this naming sequence is a "part" of partitioned relation */
887-
recordDependencyOn(&sequence, &parent, DEPENDENCY_AUTO);
887+
recordDependencyOn(&sequence, &parent, DEPENDENCY_NORMAL);
888888
}
889889
}
890890

0 commit comments

Comments
 (0)