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

Commit070bd3f

Browse files
committed
rename columns in pathman_config, refactoring
1 parentf6e97fc commit070bd3f

18 files changed

+314
-312
lines changed

‎expected/pathman_basic.out

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ SELECT pathman.create_range_partitions('test.improved_dummy', 'val',
273273
SELECT * FROM pathman.pathman_partition_list
274274
WHERE parent = 'test.improved_dummy'::REGCLASS
275275
ORDER BY partition;
276-
parent | partition | parttype |partattr | range_min | range_max
277-
---------------------+-----------------------+----------+----------+-----------+-----------
278-
test.improved_dummy | test.improved_dummy_1 | 2 | val| 1 | 2
279-
test.improved_dummy | test.improved_dummy_2 | 2 | val| 2 | 3
276+
parent | partition | parttype |expr | range_min | range_max
277+
---------------------+-----------------------+----------+------+-----------+-----------
278+
test.improved_dummy | test.improved_dummy_1 | 2 | val | 1 | 2
279+
test.improved_dummy | test.improved_dummy_2 | 2 | val | 2 | 3
280280
(2 rows)
281281

282282
SELECT pathman.drop_partitions('test.improved_dummy');
@@ -298,10 +298,10 @@ SELECT pathman.create_range_partitions('test.improved_dummy', 'val',
298298
SELECT * FROM pathman.pathman_partition_list
299299
WHERE parent = 'test.improved_dummy'::REGCLASS
300300
ORDER BY partition;
301-
parent | partition | parttype |partattr | range_min | range_max
302-
---------------------+-----------+----------+----------+-----------+-----------
303-
test.improved_dummy | p1 | 2 | val| 1 | 2
304-
test.improved_dummy | p2 | 2 | val| 2 | 3
301+
parent | partition | parttype |expr | range_min | range_max
302+
---------------------+-----------+----------+------+-----------+-----------
303+
test.improved_dummy | p1 | 2 | val | 1 | 2
304+
test.improved_dummy | p2 | 2 | val | 2 | 3
305305
(2 rows)
306306

307307
SELECT pathman.drop_partitions('test.improved_dummy');
@@ -324,10 +324,10 @@ SELECT pathman.create_range_partitions('test.improved_dummy', 'val',
324324
SELECT * FROM pathman.pathman_partition_list
325325
WHERE parent = 'test.improved_dummy'::REGCLASS
326326
ORDER BY partition;
327-
parent | partition | parttype |partattr | range_min | range_max
328-
---------------------+-----------+----------+----------+-----------+-----------
329-
test.improved_dummy | p1 | 2 | val| 1 | 2
330-
test.improved_dummy | p2 | 2 | val| 2 | 3
327+
parent | partition | parttype |expr | range_min | range_max
328+
---------------------+-----------+----------+------+-----------+-----------
329+
test.improved_dummy | p1 | 2 | val | 1 | 2
330+
test.improved_dummy | p2 | 2 | val | 2 | 3
331331
(2 rows)
332332

333333
DROP TABLE test.improved_dummy CASCADE;
@@ -1065,12 +1065,12 @@ SELECT pathman.drop_range_partition_expand_next('test.num_range_rel_4');
10651065
(1 row)
10661066

10671067
SELECT * FROM pathman.pathman_partition_list WHERE parent = 'test.num_range_rel'::regclass;
1068-
parent | partition | parttype |partattr | range_min | range_max
1069-
--------------------+----------------------+----------+----------+-----------+-----------
1070-
test.num_range_rel | test.num_range_rel_1 | 2 | id| 0 | 1000
1071-
test.num_range_rel | test.num_range_rel_2 | 2 | id| 1000 | 2000
1072-
test.num_range_rel | test.num_range_rel_3 | 2 | id| 2000 | 3000
1073-
test.num_range_rel | test.num_range_rel_6 | 2 | id| 3000 | 5000
1068+
parent | partition | parttype |expr | range_min | range_max
1069+
--------------------+----------------------+----------+------+-----------+-----------
1070+
test.num_range_rel | test.num_range_rel_1 | 2 | id | 0 | 1000
1071+
test.num_range_rel | test.num_range_rel_2 | 2 | id | 1000 | 2000
1072+
test.num_range_rel | test.num_range_rel_3 | 2 | id | 2000 | 3000
1073+
test.num_range_rel | test.num_range_rel_6 | 2 | id | 3000 | 5000
10741074
(4 rows)
10751075

10761076
SELECT pathman.drop_range_partition_expand_next('test.num_range_rel_6');
@@ -1080,11 +1080,11 @@ SELECT pathman.drop_range_partition_expand_next('test.num_range_rel_6');
10801080
(1 row)
10811081

10821082
SELECT * FROM pathman.pathman_partition_list WHERE parent = 'test.num_range_rel'::regclass;
1083-
parent | partition | parttype |partattr | range_min | range_max
1084-
--------------------+----------------------+----------+----------+-----------+-----------
1085-
test.num_range_rel | test.num_range_rel_1 | 2 | id| 0 | 1000
1086-
test.num_range_rel | test.num_range_rel_2 | 2 | id| 1000 | 2000
1087-
test.num_range_rel | test.num_range_rel_3 | 2 | id| 2000 | 3000
1083+
parent | partition | parttype |expr | range_min | range_max
1084+
--------------------+----------------------+----------+------+-----------+-----------
1085+
test.num_range_rel | test.num_range_rel_1 | 2 | id | 0 | 1000
1086+
test.num_range_rel | test.num_range_rel_2 | 2 | id | 1000 | 2000
1087+
test.num_range_rel | test.num_range_rel_3 | 2 | id | 2000 | 3000
10881088
(3 rows)
10891089

10901090
SELECT pathman.append_range_partition('test.range_rel');
@@ -1215,16 +1215,16 @@ SELECT pathman.attach_range_partition('test.range_rel', 'test.range_rel_minus_in
12151215
(1 row)
12161216

12171217
SELECT * FROM pathman.pathman_partition_list WHERE parent = 'test.range_rel'::REGCLASS;
1218-
parent | partition | parttype |partattr | range_min | range_max
1219-
----------------+-------------------------------+----------+----------+--------------------------+--------------------------
1220-
test.range_rel | test.range_rel_minus_infinity | 2 | dt| | Mon Dec 01 00:00:00 2014
1221-
test.range_rel | test.range_rel_8 | 2 | dt| Mon Dec 01 00:00:00 2014 | Thu Jan 01 00:00:00 2015
1222-
test.range_rel | test.range_rel_1 | 2 | dt| Thu Jan 01 00:00:00 2015 | Sun Feb 01 00:00:00 2015
1223-
test.range_rel | test.range_rel_2 | 2 | dt| Sun Feb 01 00:00:00 2015 | Sun Mar 01 00:00:00 2015
1224-
test.range_rel | test.range_rel_3 | 2 | dt| Sun Mar 01 00:00:00 2015 | Wed Apr 01 00:00:00 2015
1225-
test.range_rel | test.range_rel_4 | 2 | dt| Wed Apr 01 00:00:00 2015 | Fri May 01 00:00:00 2015
1226-
test.range_rel | test.range_rel_6 | 2 | dt| Fri May 01 00:00:00 2015 | Mon Jun 01 00:00:00 2015
1227-
test.range_rel | test.range_rel_plus_infinity | 2 | dt| Mon Jun 01 00:00:00 2015 |
1218+
parent | partition | parttype |expr | range_min | range_max
1219+
----------------+-------------------------------+----------+------+--------------------------+--------------------------
1220+
test.range_rel | test.range_rel_minus_infinity | 2 | dt | | Mon Dec 01 00:00:00 2014
1221+
test.range_rel | test.range_rel_8 | 2 | dt | Mon Dec 01 00:00:00 2014 | Thu Jan 01 00:00:00 2015
1222+
test.range_rel | test.range_rel_1 | 2 | dt | Thu Jan 01 00:00:00 2015 | Sun Feb 01 00:00:00 2015
1223+
test.range_rel | test.range_rel_2 | 2 | dt | Sun Feb 01 00:00:00 2015 | Sun Mar 01 00:00:00 2015
1224+
test.range_rel | test.range_rel_3 | 2 | dt | Sun Mar 01 00:00:00 2015 | Wed Apr 01 00:00:00 2015
1225+
test.range_rel | test.range_rel_4 | 2 | dt | Wed Apr 01 00:00:00 2015 | Fri May 01 00:00:00 2015
1226+
test.range_rel | test.range_rel_6 | 2 | dt | Fri May 01 00:00:00 2015 | Mon Jun 01 00:00:00 2015
1227+
test.range_rel | test.range_rel_plus_infinity | 2 | dt | Mon Jun 01 00:00:00 2015 |
12281228
(8 rows)
12291229

12301230
INSERT INTO test.range_rel (dt) VALUES ('2012-06-15');
@@ -1461,16 +1461,16 @@ INSERT INTO test.range_rel (dt) VALUES ('2015-06-01');
14611461
*/
14621462
ALTER TABLE test.range_rel DROP COLUMN data;
14631463
SELECT * FROM pathman.pathman_config;
1464-
partrel |attname | parttype | range_interval |expression_p
1465-
----------------+---------+----------+----------------+-------------------------------------------------------------------------------------------------------------------------
1466-
test.range_rel | dt| 2 | @ 10 days | {VAR :varno 1 :varattno 2 :vartype 1114 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnoold 1 :varoattno 2 :location 8}
1464+
partrel |expr | parttype | range_interval | cooked_expr
1465+
----------------+------+----------+----------------+-------------------------------------------------------------------------------------------------------------------------
1466+
test.range_rel | dt | 2 | @ 10 days | {VAR :varno 1 :varattno 2 :vartype 1114 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnoold 1 :varoattno 2 :location 8}
14671467
(1 row)
14681468

14691469
DROP TABLE test.range_rel CASCADE;
14701470
NOTICE: drop cascades to 20 other objects
14711471
SELECT * FROM pathman.pathman_config;
1472-
partrel |attname | parttype | range_interval |expression_p
1473-
---------+---------+----------+----------------+--------------
1472+
partrel |expr | parttype | range_interval |cooked_expr
1473+
---------+------+----------+----------------+-------------
14741474
(0 rows)
14751475

14761476
/* Check overlaps */
@@ -1632,9 +1632,9 @@ SELECT pathman.create_partitions_from_range('test."RangeRel"', 'dt', '2015-01-01
16321632
DROP TABLE test."RangeRel" CASCADE;
16331633
NOTICE: drop cascades to 5 other objects
16341634
SELECT * FROM pathman.pathman_config;
1635-
partrel |attname | parttype | range_interval |expression_p
1636-
--------------------+---------+----------+----------------+------------------------------------------------------------------------------------------------------------------------
1637-
test.num_range_rel | id| 2 | 1000 | {VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnoold 1 :varoattno 1 :location -1}
1635+
partrel |expr | parttype | range_interval |cooked_expr
1636+
--------------------+------+----------+----------------+------------------------------------------------------------------------------------------------------------------------
1637+
test.num_range_rel | id | 2 | 1000 | {VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnoold 1 :varoattno 1 :location -1}
16381638
(1 row)
16391639

16401640
CREATE TABLE test."RangeRel" (

‎expected/pathman_bgw.out

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ SELECT set_spawn_using_bgw('test_bgw.test_1', true);
2222

2323
INSERT INTO test_bgw.test_1 VALUES (11);
2424
SELECT * FROM pathman_partition_list ORDER BY partition; /* should contain 3 partitions */
25-
parent | partition | parttype |partattr | range_min | range_max
26-
-----------------+-------------------+----------+----------+-----------+-----------
27-
test_bgw.test_1 | test_bgw.test_1_1 | 2 | val| 1 | 6
28-
test_bgw.test_1 | test_bgw.test_1_2 | 2 | val| 6 | 11
29-
test_bgw.test_1 | test_bgw.test_1_3 | 2 | val| 11 | 16
25+
parent | partition | parttype |expr | range_min | range_max
26+
-----------------+-------------------+----------+------+-----------+-----------
27+
test_bgw.test_1 | test_bgw.test_1_1 | 2 | val | 1 | 6
28+
test_bgw.test_1 | test_bgw.test_1_2 | 2 | val | 6 | 11
29+
test_bgw.test_1 | test_bgw.test_1_3 | 2 | val | 11 | 16
3030
(3 rows)
3131

3232
DROP TABLE test_bgw.test_1 CASCADE;
@@ -48,11 +48,11 @@ SELECT set_spawn_using_bgw('test_bgw.test_2', true);
4848

4949
INSERT INTO test_bgw.test_2 VALUES (11);
5050
SELECT * FROM pathman_partition_list ORDER BY partition; /* should contain 3 partitions */
51-
parent | partition | parttype |partattr | range_min | range_max
52-
-----------------+-------------------+----------+----------+-----------+-----------
53-
test_bgw.test_2 | test_bgw.test_2_1 | 2 | val| 1 | 6
54-
test_bgw.test_2 | test_bgw.test_2_2 | 2 | val| 6 | 11
55-
test_bgw.test_2 | test_bgw.test_2_3 | 2 | val| 11 | 16
51+
parent | partition | parttype |expr | range_min | range_max
52+
-----------------+-------------------+----------+------+-----------+-----------
53+
test_bgw.test_2 | test_bgw.test_2_1 | 2 | val | 1 | 6
54+
test_bgw.test_2 | test_bgw.test_2_2 | 2 | val | 6 | 11
55+
test_bgw.test_2 | test_bgw.test_2_3 | 2 | val | 11 | 16
5656
(3 rows)
5757

5858
DROP TABLE test_bgw.test_2 CASCADE;
@@ -74,11 +74,11 @@ SELECT set_spawn_using_bgw('test_bgw.test_3', true);
7474

7575
INSERT INTO test_bgw.test_3 VALUES (11);
7676
SELECT * FROM pathman_partition_list ORDER BY partition; /* should contain 3 partitions */
77-
parent | partition | parttype |partattr | range_min | range_max
78-
-----------------+-------------------+----------+----------+-----------+-----------
79-
test_bgw.test_3 | test_bgw.test_3_1 | 2 | val| 1 | 6
80-
test_bgw.test_3 | test_bgw.test_3_2 | 2 | val| 6 | 11
81-
test_bgw.test_3 | test_bgw.test_3_3 | 2 | val| 11 | 16
77+
parent | partition | parttype |expr | range_min | range_max
78+
-----------------+-------------------+----------+------+-----------+-----------
79+
test_bgw.test_3 | test_bgw.test_3_1 | 2 | val | 1 | 6
80+
test_bgw.test_3 | test_bgw.test_3_2 | 2 | val | 6 | 11
81+
test_bgw.test_3 | test_bgw.test_3_3 | 2 | val | 11 | 16
8282
(3 rows)
8383

8484
DROP TABLE test_bgw.test_3 CASCADE;
@@ -100,11 +100,11 @@ SELECT set_spawn_using_bgw('test_bgw.test_4', true);
100100

101101
INSERT INTO test_bgw.test_4 VALUES ('20170215');
102102
SELECT * FROM pathman_partition_list ORDER BY partition; /* should contain 3 partitions */
103-
parent | partition | parttype |partattr | range_min | range_max
104-
-----------------+-------------------+----------+----------+------------+------------
105-
test_bgw.test_4 | test_bgw.test_4_1 | 2 | val| 02-13-2017 | 02-14-2017
106-
test_bgw.test_4 | test_bgw.test_4_2 | 2 | val| 02-14-2017 | 02-15-2017
107-
test_bgw.test_4 | test_bgw.test_4_3 | 2 | val| 02-15-2017 | 02-16-2017
103+
parent | partition | parttype |expr | range_min | range_max
104+
-----------------+-------------------+----------+------+------------+------------
105+
test_bgw.test_4 | test_bgw.test_4_1 | 2 | val | 02-13-2017 | 02-14-2017
106+
test_bgw.test_4 | test_bgw.test_4_2 | 2 | val | 02-14-2017 | 02-15-2017
107+
test_bgw.test_4 | test_bgw.test_4_3 | 2 | val | 02-15-2017 | 02-16-2017
108108
(3 rows)
109109

110110
DROP TABLE test_bgw.test_4 CASCADE;

‎expected/pathman_calamity.out

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ SELECT generate_range_bounds('1-jan-2017'::DATE,
473473
SELECT check_range_available(NULL, NULL::INT4, NULL);/* not ok */
474474
ERROR: 'parent_relid' should not be NULL
475475
SELECT check_range_available('pg_class', 1, 10);/* OK (not partitioned) */
476-
WARNING:relation "pg_class" is not partitioned
476+
WARNING:table "pg_class" is not partitioned
477477
check_range_available
478478
-----------------------
479479

@@ -931,10 +931,10 @@ SELECT add_to_pathman_config('calamity.survivor', 'val', '10');/* OK */
931931
(1 row)
932932

933933
SELECT * FROM pathman_partition_list;/* OK */
934-
parent | partition | parttype |partattr | range_min | range_max
935-
-------------------+---------------------+----------+----------+-----------+-----------
936-
calamity.survivor | calamity.survivor_1 | 2 | val| 1 | 11
937-
calamity.survivor | calamity.survivor_2 | 2 | val| 11 | 21
934+
parent | partition | parttype |expr | range_min | range_max
935+
-------------------+---------------------+----------+------+-----------+-----------
936+
calamity.survivor | calamity.survivor_1 | 2 | val | 1 | 11
937+
calamity.survivor | calamity.survivor_2 | 2 | val | 11 | 21
938938
(2 rows)
939939

940940
SELECT get_part_range('calamity.survivor', 0, NULL::INT);/* OK */

‎expected/pathman_callbacks.out

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -233,18 +233,18 @@ $$ LANGUAGE plpgsql;
233233
SELECT * FROM pathman_partition_list
234234
WHERE parent = 'callbacks.abc'::REGCLASS
235235
ORDER BY range_min::INT4;
236-
parent | partition | parttype |partattr | range_min | range_max
237-
---------------+------------------+----------+----------+-----------+-----------
238-
callbacks.abc | callbacks.abc_1 | 2 | a| 1 | 11
239-
callbacks.abc | callbacks.abc_2 | 2 | a| 11 | 21
240-
callbacks.abc | callbacks.abc_3 | 2 | a| 21 | 31
241-
callbacks.abc | callbacks.abc_4 | 2 | a| 31 | 41
242-
callbacks.abc | callbacks.abc_5 | 2 | a| 41 | 51
243-
callbacks.abc | callbacks.abc_6 | 2 | a| 51 | 61
244-
callbacks.abc | callbacks.abc_7 | 2 | a| 61 | 71
245-
callbacks.abc | callbacks.abc_8 | 2 | a| 71 | 81
246-
callbacks.abc | callbacks.abc_9 | 2 | a| 81 | 91
247-
callbacks.abc | callbacks.abc_10 | 2 | a| 91 | 101
236+
parent | partition | parttype |expr | range_min | range_max
237+
---------------+------------------+----------+------+-----------+-----------
238+
callbacks.abc | callbacks.abc_1 | 2 | a | 1 | 11
239+
callbacks.abc | callbacks.abc_2 | 2 | a | 11 | 21
240+
callbacks.abc | callbacks.abc_3 | 2 | a | 21 | 31
241+
callbacks.abc | callbacks.abc_4 | 2 | a | 31 | 41
242+
callbacks.abc | callbacks.abc_5 | 2 | a | 41 | 51
243+
callbacks.abc | callbacks.abc_6 | 2 | a | 51 | 61
244+
callbacks.abc | callbacks.abc_7 | 2 | a | 61 | 71
245+
callbacks.abc | callbacks.abc_8 | 2 | a | 71 | 81
246+
callbacks.abc | callbacks.abc_9 | 2 | a | 81 | 91
247+
callbacks.abc | callbacks.abc_10 | 2 | a | 91 | 101
248248
(10 rows)
249249

250250
SELECT set_init_callback('callbacks.abc',
@@ -405,12 +405,12 @@ NOTICE: dropping partition callbacks.abc_146
405405
SELECT * FROM pathman_partition_list
406406
WHERE parent = 'callbacks.abc'::REGCLASS
407407
ORDER BY range_min::INT4;
408-
parent | partition | parttype |partattr | range_min | range_max
409-
---------------+-------------------+----------+----------+-----------+-----------
410-
callbacks.abc | callbacks.abc_147 | 2 | a| 1461 | 1471
411-
callbacks.abc | callbacks.abc_148 | 2 | a| 1471 | 1481
412-
callbacks.abc | callbacks.abc_149 | 2 | a| 1481 | 1491
413-
callbacks.abc | callbacks.abc_150 | 2 | a| 1491 | 1501
408+
parent | partition | parttype |expr | range_min | range_max
409+
---------------+-------------------+----------+------+-----------+-----------
410+
callbacks.abc | callbacks.abc_147 | 2 | a | 1461 | 1471
411+
callbacks.abc | callbacks.abc_148 | 2 | a | 1471 | 1481
412+
callbacks.abc | callbacks.abc_149 | 2 | a | 1481 | 1491
413+
callbacks.abc | callbacks.abc_150 | 2 | a | 1491 | 1501
414414
(4 rows)
415415

416416
DROP TABLE callbacks.abc CASCADE;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp