Skip to content

Commit 84b3b69

Browse files
committed
add more tips to README.md
1 parent 593f47a commit 84b3b69

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,22 @@ SELECT * FROM pathman_concurrent_part_tasks;
430430
(1 row)
431431
```
432432

433+
- `pathman_partition_list` in conjunction with `drop_range_partition()` can be used to drop RANGE partitions in a more flexible way compared to good old `DROP TABLE`:
434+
```plpgsql
435+
SELECT drop_range_partition(partition, false) /* move data to parent */
436+
FROM pathman_partition_list
437+
WHERE parent = 'part_test'::regclass AND range_min::int < 500;
438+
NOTICE: 1 rows copied from part_test_11
439+
NOTICE: 100 rows copied from part_test_1
440+
NOTICE: 100 rows copied from part_test_2
441+
drop_range_partition
442+
----------------------
443+
dummy_test_11
444+
dummy_test_1
445+
dummy_test_2
446+
(3 rows)
447+
```
448+
433449
### HASH partitioning
434450
Consider an example of HASH partitioning. First create a table with some integer column:
435451
```plpgsql

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