From: Darold Gilles Date: Fri, 18 Sep 2015 13:40:26 +0000 (+0200) Subject: Extend regex on cursor name normalization. X-Git-Tag: v7.2~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3330d885585b2d523b6f749fa9f741bb1f365c00;p=pgbadger Extend regex on cursor name normalization. --- diff --git a/pgbadger b/pgbadger index 586310f..c0e8eb4 100755 --- a/pgbadger +++ b/pgbadger @@ -2916,10 +2916,10 @@ sub normalize_query $orig_query =~ s/([^a-z_\$-])0x[0-9a-f]{1,10}/${1}0x/g; # Remove IN values - $orig_query =~ s/in\s*\([\'0x,\s]*\)/in (...)/g; + $orig_query =~ s/\bin\s*\([\'0x,\s]*\)/in (...)/g; # Remove curor names in CURSOR and IN clauses - $orig_query =~ s/(declare|in)\s*"[a-zA-Z0-9_-]*"/\1 "..."/g; + $orig_query =~ s/\b(declare|in)\s+"[^"]+"/$1 "..."/g; return $orig_query; }