From: Darold Gilles Date: Thu, 22 Nov 2012 16:24:00 +0000 (+0100) Subject: Allow usage of a dash into database, user and application names when prefix is used... X-Git-Tag: v3.2~93 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3914ac3dfb7afc7287f981192022b831db50a8c3;p=pgbadger Allow usage of a dash into database, user and application names when prefix is used. Thanks to Vipul for the report. --- diff --git a/pgbadger b/pgbadger index 6d92053..03f17b8 100755 --- a/pgbadger +++ b/pgbadger @@ -4308,8 +4308,8 @@ sub build_log_line_prefix_regex { my %regex_map = ( '%a' => [('t_appname', '([0-9a-zA-Z\.\-\_\/\[\]]*)')], # application name - '%u' => [('t_dbuser', '([0-9a-zA-Z\_\[\]]*)')], # user name - '%d' => [('t_dbname', '([0-9a-zA-Z\_\[\]]*)')], # database name + '%u' => [('t_dbuser', '([0-9a-zA-Z\_\[\]\-]*)')], # user name + '%d' => [('t_dbname', '([0-9a-zA-Z\_\[\]\-]*)')], # database name '%r' => [('t_hostport', '(\[local\]|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})?[\(\d\)]*')], # remote host and port '%h' => [('t_client', '(\[local\]|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})?')], # remote host '%p' => [('t_pid', '(\d+)')], # process ID