n.nspname AS schema_name,
c.relname AS table_name,
c.reltuples::int AS num_reg
FROM pg_class c
LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
LEFT JOIN pg_tablespace t ON t.oid = c.reltablespace
WHERE c.relkind = 'r'::char
AND nspname NOT IN('information_schema','pg_catalog','pg_toast')
ORDER BY n.nspname;
Nenhum comentário:
Postar um comentário