@@ -261,6 +261,77 @@ EXPLAIN (COSTS OFF) SELECT * FROM test.improved_dummy WHERE id = 101 OR id = 5 A
261261
262262DROP TABLE test.improved_dummy CASCADE;
263263NOTICE: drop cascades to 11 other objects
264+ /* since rel_1_4_beta: check create_range_partitions(bounds array) */
265+ CREATE TABLE test.improved_dummy (val INT NOT NULL);
266+ SELECT pathman.create_range_partitions('test.improved_dummy', 'val',
267+ pathman.generate_range_bounds(1, 1, 2));
268+ create_range_partitions
269+ -------------------------
270+ 2
271+ (1 row)
272+
273+ SELECT * FROM pathman.pathman_partition_list
274+ WHERE parent = 'test.improved_dummy'::REGCLASS
275+ 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
280+ (2 rows)
281+
282+ SELECT pathman.drop_partitions('test.improved_dummy');
283+ NOTICE: 0 rows copied from test.improved_dummy_1
284+ NOTICE: 0 rows copied from test.improved_dummy_2
285+ drop_partitions
286+ -----------------
287+ 2
288+ (1 row)
289+
290+ SELECT pathman.create_range_partitions('test.improved_dummy', 'val',
291+ pathman.generate_range_bounds(1, 1, 2),
292+ partition_names := '{p1, p2}');
293+ create_range_partitions
294+ -------------------------
295+ 2
296+ (1 row)
297+
298+ SELECT * FROM pathman.pathman_partition_list
299+ WHERE parent = 'test.improved_dummy'::REGCLASS
300+ 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
305+ (2 rows)
306+
307+ SELECT pathman.drop_partitions('test.improved_dummy');
308+ NOTICE: 0 rows copied from p1
309+ NOTICE: 0 rows copied from p2
310+ drop_partitions
311+ -----------------
312+ 2
313+ (1 row)
314+
315+ SELECT pathman.create_range_partitions('test.improved_dummy', 'val',
316+ pathman.generate_range_bounds(1, 1, 2),
317+ partition_names := '{p1, p2}',
318+ tablespaces := '{pg_default, pg_default}');
319+ create_range_partitions
320+ -------------------------
321+ 2
322+ (1 row)
323+
324+ SELECT * FROM pathman.pathman_partition_list
325+ WHERE parent = 'test.improved_dummy'::REGCLASS
326+ 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
331+ (2 rows)
332+
333+ DROP TABLE test.improved_dummy CASCADE;
334+ NOTICE: drop cascades to 2 other objects
264335/* Test pathman_rel_pathlist_hook() with INSERT query */
265336CREATE TABLE test.insert_into_select(val int NOT NULL);
266337INSERT INTO test.insert_into_select SELECT generate_series(1, 100);