From: Darold Date: Sun, 30 Dec 2012 18:37:59 +0000 (+0100) Subject: Force the parser to not insert a new line after the SET keyword when the query begin... X-Git-Tag: v3.2~71 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6690b4196b1a0f9299c9f882bc3400f8c826c2a7;p=pgbadger Force the parser to not insert a new line after the SET keyword when the query begin with it. This is to preserve the single line with queries like SET client_encoding TO "utf8"; --- diff --git a/pgbadger b/pgbadger index 1600a3a..7a9c1e5 100755 --- a/pgbadger +++ b/pgbadger @@ -5173,7 +5173,7 @@ sub build_log_line_prefix_regex $self->_back if (!$last and $last ne '(' and $last ne 'FOR'); $self->_new_line; $self->_add_token($token); - $self->_new_line if ($self->_next_token and $self->_next_token ne '(' and $self->_next_token ne ';'); + $self->_new_line if ((($token ne 'SET') || $last) and $self->_next_token and $self->_next_token ne '(' and $self->_next_token ne ';'); $self->_over; }