From: Darold Gilles Date: Thu, 7 Mar 2013 22:12:46 +0000 (+0100) Subject: Force pgbadger to not try to beautify queries bigger than 10kb, this will take too... X-Git-Tag: v3.2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6ebbec33467fc73a5a1e52ed762bb73fa77778b;p=pgbadger Force pgbadger to not try to beautify queries bigger than 10kb, this will take too much time. This value can be reduce in the future if hang with long queries still happen. Thanks to John Rouillard for the report. --- diff --git a/pgbadger b/pgbadger index 93ad8f7..b5fb43a 100755 --- a/pgbadger +++ b/pgbadger @@ -4476,6 +4476,10 @@ sub highlight_code # Try to escape HTML code $code =~ s/<([\/a-zA-Z])\b/\<$1/sg; + # Do not try to prettify queries longuer + # than 10KB this will take too much time + return $code if (length($code) > 10240); + # prettify SQL query if (!$noprettify) { $sql_prettified->query($code);