Pg_partition_tree
List PostgreSQL Partitioned Tables with SQL
Apr 9, 2026 / · 8 min read · partitioning administration pg_class pg_namespace pg_inherits pg_get_userbyid pg_partition_tree pg_relation_size pg_size_pretty ·List Partitioned and Ordinary Tables in PostgreSQL Before you change a retention job, plan a migration, or add a partition for next month, you need a plain list of which tables are partitioned and which are not. pg_class joined to pg_namespace gives that list for the whole database in one query, and a count from …
Read More