summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheck_postgres.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index f11740be7..395ea508e 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -7538,7 +7538,7 @@ sub check_txn_idle {
$SQL2 =~ s/BY xact_start,/BY/;
}
else {
- $SQL = q{SELECT datname, datid, procpid AS pid, usename, client_addr, current_query AS current_query, '' AS state, }.
+ $SQL2 = $SQL = q{SELECT datname, datid, procpid AS pid, usename, client_addr, current_query AS current_query, '' AS state, }.
q{CASE WHEN client_port < 0 THEN 0 ELSE client_port END AS client_port, }.
qq{COALESCE(ROUND(EXTRACT(epoch FROM now()-$start)),0) AS seconds }.
qq{FROM pg_stat_activity WHERE $clause$USERWHERECLAUSE }.