Petit bout de code bien pratique pour compter les lignes.
for tablename in
$(psql v14 -t -c "select table_name as _table from information_schema.tables t
where t.table_schema='v14' order by _table asc");
do
echo $tablename
psql -c "select count(*) ${tablename} from
${tablename};" >> compte_v14.log
done