User Tools

Site Tools


postgresql

This is an old revision of the document!


List tables

psql -U postgres -tA -c 'SELECT datname FROM pg_database' | sort

Get statistics

db=... ; pghost=localhost
psql -U postgres -h $pghost -t -A -c "SELECT datname, tup_inserted, tup_updated, tup_deleted FROM pg_stat_database WHERE datname='$db';"
/docs/dokuwiki/data/attic/postgresql.1566651170.txt.gz · Last modified: 2019-08-24 14:52:50 by mi