diff options
author | Greg Sabino Mullane | 2011-11-23 14:13:46 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2011-11-23 14:13:46 +0000 |
commit | e290f377a2845f186e615a1f991441fd76ab03f2 (patch) | |
tree | 1460d36d613efb1c4e1e96ec09a100d3f2b3bfbd /check_postgres.pl | |
parent | 86f81cf0a60cbf416f36c6aac8e9849e1ec9ddd1 (diff) |
Change join to pg_user to a left join, as the database may be owned by a role.
Thanks to Emmanuel Lesouef for the bug report and help in tracking this down.
There are probably other incorrect inner joins to pg_user in the code.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 622c5d437..3b5852365 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -3978,7 +3978,7 @@ SELECT pg_database_size(d.oid) AS dsize, datname, usename FROM pg_database d -JOIN pg_user u ON (u.usesysid=d.datdba)$USERWHERECLAUSE +LEFT JOIN pg_user u ON (u.usesysid=d.datdba)$USERWHERECLAUSE }; if ($opt{perflimit}) { $SQL .= " ORDER BY 1 DESC LIMIT $opt{perflimit}"; |