Hi
postgres=# SELECT count(*) from data;
┌─────────┐
│ count │
╞═════════╡
│ 1000000 │
└─────────┘
(1 row)
\dt+ can display actual size of partitioned table data - now zero is displayed
postgres=# \dt+ data
List of relations
┌────────┬──────┬───────┬───────┬─────────┬─────────────┐
│ Schema │ Name │ Type │ Owner │ Size │ Description │
╞════════╪══════╪═══════╪═══════╪═════════╪═════════════╡
│ public │ data │ table │ pavel │ 0 bytes │ │
└────────┴──────┴───────┴───────┴─────────┴─────────────┘
(1 row)
postgres=# \dt+ data*
List of relations
┌────────┬────────────┬───────┬───────┬─────────┬─────────────┐
│ Schema │ Name │ Type │ Owner │ Size │ Description │
╞════════╪════════════╪═══════╪═══════╪═════════╪═════════════╡
│ public │ data │ table │ pavel │ 0 bytes │ │
│ public │ data_2016 │ table │ pavel │ 17 MB │ │
│ public │ data_2017 │ table │ pavel │ 17 MB │ │
│ public │ data_other │ table │ pavel │ 8224 kB │ │
└────────┴────────────┴───────┴───────┴─────────┴─────────────┘
(4 rows)
or we can introduce some option for display only partitioned tables without partitions.
Regards
Pavel