From: Darold Gilles Date: Mon, 22 Jun 2015 16:36:48 +0000 (+0200) Subject: Fix broken queries with multiline in bind parameters. Thank to Nicolas Thauvin for... X-Git-Tag: v7.1~3^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8d99a46884c33b972b6ccce33cb9a05fab6fbb02;p=pgbadger Fix broken queries with multiline in bind parameters. Thank to Nicolas Thauvin for the report. --- diff --git a/pgbadger b/pgbadger index ef3a998..54d4b15 100755 --- a/pgbadger +++ b/pgbadger @@ -2374,6 +2374,9 @@ sub process_file if (exists $cur_plan_info{$cur_pid}{duration}) { $cur_plan_info{$cur_pid}{plan} .= "\n" . $line; + } elsif (exists $cur_info{$cur_pid}{parameters}) { + # stores bind parameters if any + $cur_info{$cur_pid}{parameters} .= "\n" . $line; } elsif (exists $cur_temp_info{$cur_pid}{query}) { $cur_temp_info{$cur_pid}{query} .= "\n" . $line; } elsif (exists $cur_lock_info{$cur_pid}{query}) { @@ -2501,6 +2504,9 @@ sub process_file if (exists $cur_plan_info{$cur_pid}{duration}) { $cur_plan_info{$cur_pid}{plan} .= "\n" . $line; + } elsif (exists $cur_info{$cur_pid}{parameters}) { + # stores bind parameters if any + $cur_info{$cur_pid}{parameters} .= "\n" . $line; } elsif (exists $cur_temp_info{$cur_pid}{size}) { if (exists $cur_info{$cur_pid}{query} && !$cur_temp_info{$cur_pid}{query}) { $cur_temp_info{$cur_pid}{query} = $cur_info{$cur_pid}{query};