]> granicus.if.org Git - pgbadger/commitdiff
Fix auto detection of log_min_duration_statement format.
authorDarold <gilles@darold.net>
Tue, 23 Oct 2012 07:38:46 +0000 (09:38 +0200)
committerDarold <gilles@darold.net>
Tue, 23 Oct 2012 07:38:46 +0000 (09:38 +0200)
pgbadger

index 58160d28af4bb2cca31a7a5ab3520e70486cda92..980c0ecc4a83e42c630e3678013848f4088f59ec 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -3802,8 +3802,7 @@ sub autodetect_duration
                $line =~ s/\r//;
                next if (!$line);
                $nline++;
-
-               if (($line =~ /\s+duration: \d+\.\d+ ms\s+/) || ($line =~ /,"duration: \d+\.\d+ ms\s+[^"]+"/)) {
+               if (($line =~ /\s+duration: \d+\.\d+ ms\s+(query|statement|prepare|parse|bind|execute)/) || ($line =~ /,"duration: \d+\.\d+ ms\s+(query|statement|prepare|parse|bind|execute)[^"]+"/)) {
                        $nfound++;
                }
                last if (($nfound > 10) || ($nline > 25000));