PG-153: Log application name.

This commit is contained in:
Ibrar Ahmed
2020-11-24 21:03:32 +00:00
parent 33b0b4a3e0
commit 6ec5c2b4ed
3 changed files with 58 additions and 17 deletions

View File

@@ -22,6 +22,7 @@ CREATE FUNCTION pg_stat_monitor(IN showtext boolean,
OUT queryid text,
OUT query text,
OUT application_name text,
OUT relations text,
OUT cmd_type text,
OUT elevel int,
@@ -97,6 +98,7 @@ CREATE VIEW pg_stat_monitor AS SELECT
'0.0.0.0'::inet + client_ip AS client_ip,
queryid,
query,
application_name,
(string_to_array(relations, ',')) relations,
(string_to_array(cmd_type, ',')) cmd_type,
elevel,