Well, so my requirement this time was to get the size of all tables in a particular schema. HOW?
AFAIK, there was no direct way to fulfill my requirement. So wrote my own query..
Where ‘archival’ is the schema name. Checkout the type-casting.
Short explanation: sum() returns int type, but pg_size_pretty() takes bigint as the param data type. Hence the type casting.
NB:- when copying the query, take care of the quotes.