Add support for an application_name parameter, which is displayed in

pg_stat_activity and recorded in log entries.

Dave Page, reviewed by Andres Freund
This commit is contained in:
Tom Lane
2009-11-28 23:38:08 +00:00
parent cb98f61538
commit 8217cfbd99
16 changed files with 479 additions and 95 deletions

View File

@ -3,7 +3,7 @@
*
* Copyright (c) 1996-2009, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.61 2009/10/07 22:14:18 alvherre Exp $
* $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.62 2009/11/28 23:38:07 tgl Exp $
*/
CREATE VIEW pg_roles AS
@ -339,7 +339,8 @@ CREATE VIEW pg_stat_activity AS
S.query_start,
S.backend_start,
S.client_addr,
S.client_port
S.client_port,
S.application_name
FROM pg_database D, pg_stat_get_activity(NULL) AS S, pg_authid U
WHERE S.datid = D.oid AND
S.usesysid = U.oid;