summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Thauvin2011-06-27 15:26:47 +0000
committerGuillaume Lelarge2011-06-27 15:26:47 +0000
commit3958c80e5a06d15c0ed1b98122a6519b79250f3c (patch)
tree3c76d61b9d3942c1e1941bc7092a80388f4d12eb
parentb91182610a046ce657a93f539f3b8e1988a006e3 (diff)
Fix ORDER BY in the last vacuum/analyze action
Before this patch, the "ORDER BY" was on the relname column. This fixes it to get an ORDER BY on the last time column, which is more interesting (especially when you have a perflimit).
-rwxr-xr-xcheck_postgres.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index 0294eecf3..0bc1ac254 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -4414,7 +4414,7 @@ FROM (SELECT nspname, relname, $criteria AS v
ORDER BY 3) AS foo
};
if ($opt{perflimit}) {
- $SQL .= ' ORDER BY 3 DESC';
+ $SQL .= ' ORDER BY 4 DESC';
}
if ($USERWHERECLAUSE) {