Grrr...account for trailing whitespace in psql table output
authorGreg Sabino Mullane <[email protected]>
Thu, 30 Oct 2014 22:14:58 +0000 (18:14 -0400)
committerGreg Sabino Mullane <[email protected]>
Thu, 30 Oct 2014 22:14:58 +0000 (18:14 -0400)
check_postgres.pl

index 634fffefb9c17d47790e2d696385fe10cf0c57a9..1893b62d65ee1fbb01396968ca7420f530244192 100755 (executable)
@@ -2459,7 +2459,7 @@ sub run_command {
                     $lnum++;
                     next;
                 }
-                if ($line =~ /^ ?([\?\w]+)\s+\| (.*)/) {
+                if ($line =~ /^ ?([\?\w]+)\s+\| (.*?)\s*$/) {
                     $stuff[$lnum]{$1} = $2;
                     $lastval = $1;
                 }