[EN]
The node displays information about the size of all objects in the schema, as well as the percentage of the schema size from the size of the entire PostgreSQL database
SELECT pg_size_pretty(sum(table_size)::bigint) as "disk_space",
round((sum(table_size) / pg_database_size(current_database())) * 100) || '%' as "percent"
FROM (
SELECT n.nspname as schema_name,
pg_relation_size(c.oid) as table_size
FROM pg_catalog.pg_class c
JOIN pg_catalog.pg_namespace n
ON c.relnamespace = n.oid
WHERE n.nspname = $$SCHEMANAME
) t
[RU]
Узел отображает информацию о размере всех объектов в схеме, а так же процент размера схемы от размера всей базы данных PostgreSQL
SELECT pg_size_pretty(sum(table_size)::bigint) as "disk_space",
round((sum(table_size) / pg_database_size(current_database())) * 100) || '%' as "percent"
FROM (
SELECT n.nspname as schema_name,
pg_relation_size(c.oid) as table_size
FROM pg_catalog.pg_class c
JOIN pg_catalog.pg_namespace n
ON c.relnamespace = n.oid
WHERE n.nspname = $$SCHEMANAME
) t