@@ -1804,6 +1804,64 @@ ORDER BY partition;
18041804
18051805DROP TABLE test.provided_part_names CASCADE;
18061806NOTICE: drop cascades to 2 other objects
1807+ -- is pathman (caches, in particular) strong enough to carry out this?
1808+ -- 079797e0d5
1809+ CREATE TABLE test.part_test(val serial);
1810+ INSERT INTO test.part_test SELECT generate_series(1, 30);
1811+ SELECT create_range_partitions('test.part_test', 'val', 1, 10);
1812+ create_range_partitions
1813+ -------------------------
1814+ 3
1815+ (1 row)
1816+
1817+ SELECT set_interval('test.part_test', 100);
1818+ set_interval
1819+ --------------
1820+
1821+ (1 row)
1822+
1823+ DELETE FROM pathman_config WHERE partrel = 'test.part_test'::REGCLASS;
1824+ SELECT drop_partitions('test.part_test');
1825+ ERROR: table "test.part_test" has no partitions
1826+ SELECT disable_pathman_for('test.part_test');
1827+ disable_pathman_for
1828+ ---------------------
1829+
1830+ (1 row)
1831+
1832+ CREATE TABLE test.wrong_partition (LIKE test.part_test) INHERITS (test.part_test);
1833+ NOTICE: merging column "val" with inherited definition
1834+ SELECT add_to_pathman_config('test.part_test', 'val', '10');
1835+ ERROR: constraint "pathman_wrong_partition_check" of partition "wrong_partition" does not exist
1836+ SELECT add_to_pathman_config('test.part_test', 'val');
1837+ ERROR: wrong constraint format for HASH partition "part_test_1"
1838+ DROP TABLE test.part_test CASCADE;
1839+ NOTICE: drop cascades to 5 other objects
1840+ --
1841+ -- 85fc5ccf121
1842+ CREATE TABLE test.part_test(val serial);
1843+ INSERT INTO test.part_test SELECT generate_series(1, 3000);
1844+ SELECT create_range_partitions('test.part_test', 'val', 1, 10);
1845+ create_range_partitions
1846+ -------------------------
1847+ 300
1848+ (1 row)
1849+
1850+ SELECT append_range_partition('test.part_test');
1851+ append_range_partition
1852+ ------------------------
1853+ test.part_test_301
1854+ (1 row)
1855+
1856+ DELETE FROM test.part_test;
1857+ SELECT create_single_range_partition('test.part_test', NULL::INT4, NULL);/* not ok */
1858+ ERROR: cannot create partition with range (-inf, +inf)
1859+ DELETE FROM pathman_config WHERE partrel = 'test.part_test'::REGCLASS;
1860+ SELECT create_hash_partitions('test.part_test', 'val', 2, partition_names := ARRAY[]::TEXT[]); /* not ok */
1861+ ERROR: can't partition table "test.part_test" with existing children
1862+ DROP TABLE test.part_test CASCADE;
1863+ NOTICE: drop cascades to 302 other objects
1864+ --
18071865DROP SCHEMA test CASCADE;
18081866NOTICE: drop cascades to 28 other objects
18091867DROP EXTENSION pg_pathman CASCADE;