This might be old hat for you guys, but I just found out how to set up
a dynamically
updated xterm window showing currently running queries:
watch "psql -U postgres -c 'SELECT datname,procpid,current_query FROM
pg_stat_activity;'|grep -v IDLE|grep -v 'SELECT
datname,procpid,current_query FROM pg_stat_activity;' | grep -v ^\( |
grep -v 'datname | procpid ' | grep -v -- '-----------+---------+-' "
Make it update 4 times a second with adding "-n 0.25" argument to watch.
Best,
-at