/[webpac]/trunk/tools/count_tables.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/tools/count_tables.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 116 by dpavlin, Mon Jul 21 15:54:57 2003 UTC revision 117 by dpavlin, Mon Jul 21 16:05:42 2003 UTC
# Line 9  else Line 9  else
9  fi  fi
10    
11  echo "records in $db, by table"  echo "records in $db, by table"
12  psql $db -A -t -F : -c "\d" | cut -d: -f2 | xargs -i psql $db -A -t -F "        " -c "select count(*),'{}' from {}" | sort -nr  psql $db -A -t -c "select tablename from pg_tables where tablename not like 'pg_%'" | xargs -i psql $db -A -t -F "      " -c "select count(*),'{}' from {}" | sort -nr

Legend:
Removed from v.116  
changed lines
  Added in v.117

  ViewVC Help
Powered by ViewVC 1.1.26