]> granicus.if.org Git - pgbadger/commitdiff
Translate action WITH into CTE, regression introduced in last release
authorGilles Darold <gilles@darold.net>
Thu, 12 Sep 2019 07:18:32 +0000 (09:18 +0200)
committerGilles Darold <gilles@darold.net>
Thu, 12 Sep 2019 07:18:32 +0000 (09:18 +0200)
pgbadger

index 7e6820954c315deb9d25386bbbe857ef19dabd07..4504cc6d39ae1edda5c904245973fcbe8f411d18 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -15466,6 +15466,7 @@ sub store_queries
                        my $action = uc($1);
                        if ($normalized =~ $action_regex) {
                                $action = uc($1);
+                               $action = 'CTE' if ($action eq 'WITH');
                                # if this is a copy statement try to find if this is a write or read statement
                                if (($action eq 'copy') && (($normalized =~ /from\s+stdin/i) || ($normalized =~ /from\s+'[^']+'/is))) {
                                        $action = 'copy from';