]> granicus.if.org Git - pgbadger/commitdiff
Normalize cursor names
authorJulien Rouhaud <julien.rouhaud@free.fr>
Fri, 18 Sep 2015 13:23:22 +0000 (15:23 +0200)
committerJulien Rouhaud <julien.rouhaud@free.fr>
Fri, 18 Sep 2015 13:23:22 +0000 (15:23 +0200)
pgbadger

index 29bdaa0b729c2c0650e531c470f9defd321438ba..586310f5d979e0eaeb2b0d5abb65629ab80eff4f 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -2918,6 +2918,9 @@ sub normalize_query
        # Remove IN values
        $orig_query =~ s/in\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;
+
        return $orig_query;
 }