]> granicus.if.org Git - pgbadger/commitdiff
Add Json Operators to SQL Beautifier. Thanks to Tom Burnett and Hubert depesz Lubacze...
authorDarold Gilles <gilles@darold.net>
Wed, 13 May 2015 15:21:34 +0000 (17:21 +0200)
committerDarold Gilles <gilles@darold.net>
Wed, 13 May 2015 15:21:34 +0000 (17:21 +0200)
pgbadger

index 8781f869bd7619fe8f1a0f183415a6fb4c3f2c76..b26070326203cdd4a57be8803ba8de8885dce5c7 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -11818,13 +11818,15 @@ sub build_log_line_prefix_regex
                my $re = qr{
     (
         (?:--)[\ \t\S]*      # single line comments
-        |
-        (?:<>|<=>|>=|<=|==|=|!=|!|<<|>>|<|>|\|\||\||&&|&|-|\+|\*(?!/)|/(?!\*)|\%|~|\^|\?)
-                                # operators and tests
        |
        (?:\#|\@\-\@|\@\@|\#\#|<\->|\&<|\&>|<<\||\|>>|\&<\||\|\&>|<\^|>\^|\?\#|\?\-|\?\||\?\-\||\?\|\||\@>|<\@|\~=)
                                # Geometric Operators
         |
+        (?:\->>|\->|\#>|\?\&|\?)  # Json Operators
+        |
+        (?:<>|<=>|>=|<=|==|=|!=|!|<<|>>|<|>|\|\||\||&&|&|-|\+|\*(?!/)|/(?!\*)|\%|~|\^|\?)
+                                # operators and tests
+        |
         [\[\]\(\),;.]            # punctuation (parenthesis, comma)
         |
         \'\'(?!\')              # empty single quoted string