]> granicus.if.org Git - pgbadger/commitdiff
Fix issue in SQL formatting that prevent left back indentation when major keywords...
authorDarold Gilles <gilles@darold.net>
Fri, 4 Jan 2013 14:08:11 +0000 (15:08 +0100)
committerDarold Gilles <gilles@darold.net>
Fri, 4 Jan 2013 14:08:11 +0000 (15:08 +0100)
pgbadger

index 0c32b15863da7f5a7bb33e927621298a8bbf8573..965685251e66c4d18974d67f2eb2b427423df991 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -5170,7 +5170,7 @@ sub build_log_line_prefix_regex
                        }
 
                        elsif ($token =~ /^(?:SELECT|FROM|WHERE|HAVING|BEGIN|SET)$/i) {
-                               $self->_back if (!$last and $last ne '(' and $last ne 'FOR');
+                               $self->_back if ($last and $last ne '(' and $last ne 'FOR');
                                $self->_new_line;
                                $self->_add_token($token);
                                $self->_new_line if ((($token ne 'SET') || $last) and $self->_next_token and $self->_next_token ne '(' and $self->_next_token ne ';');