diff --git a/fish/fish/functions/pg_oldies.fish b/fish/fish/functions/pg_oldies.fish new file mode 100644 index 0000000..d5dfd80 --- /dev/null +++ b/fish/fish/functions/pg_oldies.fish @@ -0,0 +1,6 @@ +function pg_oldies + watch -n1 "psql -c \"\ + select substring(query from 0 for 120) q,\ + now() - query_start from pg_stat_activity\ + where state='active' order by query_start limit 20\"" +end