From 6690b4196b1a0f9299c9f882bc3400f8c826c2a7 Mon Sep 17 00:00:00 2001 From: Darold Date: Sun, 30 Dec 2012 19:37:59 +0100 Subject: [PATCH] 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"; --- pgbadger | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.40.0