pgtoolkit/pgstats.py
changeset 44 4fe39c59c515
parent 39 0cef3540b69f
--- a/pgtoolkit/pgstats.py	Wed Sep 26 16:21:59 2012 +0200
+++ b/pgtoolkit/pgstats.py	Wed Sep 26 16:28:28 2012 +0200
@@ -41,8 +41,9 @@
             curs.close()
 
     def list_long_queries(self, longer_than='1m'):
-        return self._query('''SELECT datname, procpid, usename, current_query AS query,
-            waiting, xact_start, query_start, backend_start
+        return self._query('''SELECT
+              datname, procpid, usename, current_query AS query,
+              waiting, xact_start, query_start, backend_start, client_addr
             FROM pg_stat_activity
             WHERE current_query <> '<IDLE>' AND query_start < now() - interval %s
             ORDER BY query_start;''',