From: Darold Gilles Date: Fri, 4 Jan 2013 14:08:11 +0000 (+0100) Subject: Fix issue in SQL formatting that prevent left back indentation when major keywords... X-Git-Tag: v3.2~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e6956cf201d5e3db7d638836e2528913a2451bd;p=pgbadger Fix issue in SQL formatting that prevent left back indentation when major keywords were found. Thanks to Kevin Brannen for the report. --- diff --git a/pgbadger b/pgbadger index 0c32b15..9656852 100755 --- 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 ';');