Browse files

update to psqlrc

- having autocommit disabled bugged me
- timing on (suggestion from magnush)
- 'top' command to view current queries (suggestion from selenamarie);  use as ":top" from psql
  • Loading branch information...
1 parent 2b52549 commit da3ec9c2bdc802af299e68b5d795d141016ad309 @gorthx committed May 24, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 psqlrc
4 psqlrc
@@ -1,3 +1,5 @@
\pset null '[null]'
\set HISTFILE ~/.psql_history- :DBNAME
-\set AUTOCOMMIT off
+\set top 'SELECT waiting, usename, procpid, COALESCE(now()-query_start, now()-backend_start) AS duration, client_addr, current_query FROM pg_stat_activity WHERE current_query <> ''<IDLE>'' ORDER BY duration;'

0 comments on commit da3ec9c

Please sign in to comment.