]> granicus.if.org Git - pgbadger/commitdiff
Fix previous patch for csvlog generated with a PostgreSQL version before 9.0
authorDarold Gilles <gilles@darold.net>
Thu, 9 Apr 2015 17:57:14 +0000 (19:57 +0200)
committerDarold Gilles <gilles@darold.net>
Thu, 9 Apr 2015 17:57:14 +0000 (19:57 +0200)
pgbadger

index 452b56ed00fb57a603de5c9203c24571b313b4f3..76f549864534a2b09092421858a657843bda2dcf 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -2035,8 +2035,8 @@ sub process_file
                                # We received a signal
                                last CSVLOOP if ($terminate);
 
-                               # 23 columns in csvlog (from 9.0 to current)
-                               next if $#{$row} != 22;
+                               # Number of columns in csvlog (22 before 9.0 and 23 from 9.0 to current)
+                               next if ( ($#{$row} != 22) && ($#{$row} != 21) );
 
                                # Set progress statistics
                                $cursize += length(join(',', @$row));