disqus/Diamond — pull request #1 by dreadatour (2013-04-18 18:33:53+00:00)
Title: PostgreSQL 9.2 support

In PostgreSQL >= 9.2 `pg_stat_activity` table has new format.
Column `procpid` has been renamed to `pid`.
Column `current_query` disappears and is replaced by two columns:
- state: is the session running a query, waiting
- query: what is the last run (or still running if stat is "active") query
We need to check PostgreSQL version to use this columns in this table.