La requête donne un résultat réel (n'est pas une approximation)

 

select table_schema,
table_name,
(xpath('/row/cnt/text()', xml_count))[1]::text::int as row_count
from (
select table_name, table_schema,
query_to_xml(format('select count(*) as cnt from %I.%I', table_schema, table_name), false, true, '') as xml_count
from information_schema.tables
where table_schema = 'public'
) t;

 

table_schema = 'mettre_votre_nom_de_schema' , par défaut c'est 'public'