From: Darold Gilles Date: Sun, 3 Mar 2013 15:49:16 +0000 (+0100) Subject: Fix an other issue in replacing bind param when the bind value is alone on a single... X-Git-Tag: v3.2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5435ded17b98000b3b787aeb4304baf6f2a228cc;p=pgbadger Fix an other issue in replacing bind param when the bind value is alone on a single line. Thanks to Kjeld Peters for the report. --- diff --git a/pgbadger b/pgbadger index 1e9c84d..5b694f5 100755 --- a/pgbadger +++ b/pgbadger @@ -1250,7 +1250,7 @@ sub process_file $autovacuum_info{tables}{$cur_info{$cur_pid}{vacuum}}{$1}{removed} += $2; } next; - } elsif ($line =~ /[,\s]*\$(\d+)\s=\s/) { + } elsif ( $cur_info{$cur_pid}{parameters} && (($line =~ /[,\s]*\$(\d+)\s=\s/) || ($line =~ /^'[^']*'$/)) ) { # stores bind parameters if any $cur_info{$cur_pid}{parameters} .= " $t_query"; next; @@ -1338,7 +1338,7 @@ sub process_file $autovacuum_info{tables}{$cur_info{$cur_pid}{vacuum}}{$1}{removed} += $2; } next; - } elsif ($line =~ /[,\s]*\$(\d+)\s=\s/) { + } elsif ( $cur_info{$cur_pid}{parameters} && (($line =~ /[,\s]*\$(\d+)\s=\s/) || ($line =~ /^'[^']*'$/)) ) { # stores bind parameters if any $cur_info{$cur_pid}{parameters} .= " $line"; next;