]> granicus.if.org Git - pgbadger/commit
Try to detect user/database/host from connection strings if
authorGilles Darold <gilles.darold@dalibo.com>
Thu, 1 Sep 2016 08:29:59 +0000 (10:29 +0200)
committerGilles Darold <gilles.darold@dalibo.com>
Thu, 1 Sep 2016 08:29:59 +0000 (10:29 +0200)
commit147cae33463b8762c461ae7de7646150185495be
tree52b44bc2ff6069f96977609178b190784baf68d0
parent3e54c36eb633e99c4a7ca55481633c42e794ba00
Try to detect user/database/host from connection strings if
log_connection is enabled and log_line_prefix doesn't include
them.

Extend the regex to autodetect database name, user name, client
ip address and application name. The regex now are the foolowing:

db => qr/(?:db|database)=([^,]*)/;
user => qr/(?:user|usr)=([^,]*)/;
client => qr/(?:client|remote|ip|host)=([^,]*)/;
appname => qr/(?:app|application)=([^,]*)/;

I hope this patch will limit the number of RTFM support answer.
pgbadger