From c1122b675ae1e6b92422599b38aa52c055ffff3b Mon Sep 17 00:00:00 2001
From: Greg Sabino Mullane <greg@endpoint.com>
Date: Thu, 30 Oct 2014 17:09:10 -0400
Subject: [PATCH] Thanks a lot, Postgres. Now featuring whitespace in psql
 output that has never been there before.

---
 check_postgres.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/check_postgres.pl b/check_postgres.pl
index a48e36fba..634fffefb 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -2459,7 +2459,7 @@ sub run_command {
                     $lnum++;
                     next;
                 }
-                if ($line =~ /^([\?\w]+)\s+\| (.*)/) {
+                if ($line =~ /^ ?([\?\w]+)\s+\| (.*)/) {
                     $stuff[$lnum]{$1} = $2;
                     $lastval = $1;
                 }
@@ -2488,7 +2488,7 @@ sub run_command {
                     warn "OS:               $^O\n";
                     warn "Action:           $action\n";
                     warn "Calling line:     $cline\n";
-                    warn "Output:           $line\n";
+                    warn "Output:           >>$line<<\n";
                     $args =~ s/ -c (.+)/ -c "$1"/s;
                     warn "Command:          $PSQL $args\n";
                     ## Next to last thing is to see if we can grab the PG version
-- 
2.39.5

