Skip to content

Commit ba7b036

Browse files
committed
improve pathman_domains regression test
1 parent a6ca7c2 commit ba7b036

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

expected/pathman_domains.out

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,44 @@ ORDER BY range_min::INT, range_max::INT;
8787
domains.dom_table | domains.dom_table_15 | 2 | val | 1101 | 1201
8888
(14 rows)
8989

90+
SELECT drop_partitions('domains.dom_table');
91+
NOTICE: function domains.dom_table_upd_trig_func() does not exist, skipping
92+
NOTICE: 49 rows copied from domains.dom_table_1
93+
NOTICE: 100 rows copied from domains.dom_table_3
94+
NOTICE: 100 rows copied from domains.dom_table_4
95+
NOTICE: 100 rows copied from domains.dom_table_5
96+
NOTICE: 100 rows copied from domains.dom_table_6
97+
NOTICE: 100 rows copied from domains.dom_table_7
98+
NOTICE: 100 rows copied from domains.dom_table_8
99+
NOTICE: 100 rows copied from domains.dom_table_9
100+
NOTICE: 99 rows copied from domains.dom_table_10
101+
NOTICE: 1 rows copied from domains.dom_table_11
102+
NOTICE: 0 rows copied from domains.dom_table_12
103+
NOTICE: 0 rows copied from domains.dom_table_13
104+
NOTICE: 151 rows copied from domains.dom_table_14
105+
NOTICE: 1 rows copied from domains.dom_table_15
106+
drop_partitions
107+
-----------------
108+
14
109+
(1 row)
110+
111+
SELECT create_hash_partitions('domains.dom_table', 'val', 5);
112+
create_hash_partitions
113+
------------------------
114+
5
115+
(1 row)
116+
117+
SELECT * FROM pathman_partition_list
118+
ORDER BY partition::TEXT;
119+
parent | partition | parttype | partattr | range_min | range_max
120+
-------------------+---------------------+----------+----------+-----------+-----------
121+
domains.dom_table | domains.dom_table_0 | 1 | val | |
122+
domains.dom_table | domains.dom_table_1 | 1 | val | |
123+
domains.dom_table | domains.dom_table_2 | 1 | val | |
124+
domains.dom_table | domains.dom_table_3 | 1 | val | |
125+
domains.dom_table | domains.dom_table_4 | 1 | val | |
126+
(5 rows)
127+
90128
DROP SCHEMA domains CASCADE;
91-
NOTICE: drop cascades to 17 other objects
129+
NOTICE: drop cascades to 8 other objects
92130
DROP EXTENSION pg_pathman CASCADE;

sql/pathman_domains.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,12 @@ SELECT * FROM pathman_partition_list
3333
ORDER BY range_min::INT, range_max::INT;
3434

3535

36+
SELECT drop_partitions('domains.dom_table');
37+
SELECT create_hash_partitions('domains.dom_table', 'val', 5);
38+
39+
SELECT * FROM pathman_partition_list
40+
ORDER BY partition::TEXT;
41+
42+
3643
DROP SCHEMA domains CASCADE;
3744
DROP EXTENSION pg_pathman CASCADE;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy