Skip to content

Instantly share code, notes, and snippets.

select t.name, count(tbl) / 1000.0 as gb
from
(
select distinct datname, id, name
from stv_tbl_perm
join pg_database
on pg_database.oid = db_id
) t
join stv_blocklist
on tbl = t.id