Hello guys.

Does anyone out there know how I can find out with an SQL query (NOT from the shell!) if a table is partitioned? Maybe a select in the system catalogs? I went through all the tables and views there but no luck... I only found out if an index is partitioned, by doing:

select c.relname, i.indisclustered from pg_index i INNER JOIN pg_class c on c.oid = i.indexrelid;
Any ideas?

I am also looking into how I can find out with an SQL query (again, NOT from a shell!) the actual and maximum size of each datafile in an PostgreSQL server.