mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Make the new pg_stat_get_activity use OUT parameters, so you don't have to
specify the column names and types. Also simplifies the view. Per comments from Tom.
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
* Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.50 2008/05/07 14:41:55 mha Exp $
|
* $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.51 2008/05/08 08:58:59 mha Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CREATE VIEW pg_roles AS
|
CREATE VIEW pg_roles AS
|
||||||
@ -353,12 +353,7 @@ CREATE VIEW pg_stat_activity AS
|
|||||||
S.backend_start,
|
S.backend_start,
|
||||||
S.client_addr,
|
S.client_addr,
|
||||||
S.client_port
|
S.client_port
|
||||||
FROM pg_database D,
|
FROM pg_database D, pg_stat_get_activity(NULL) AS S, pg_authid U
|
||||||
pg_stat_get_activity(NULL) AS S(datid oid, procpid int,
|
|
||||||
usesysid oid, current_query text, waiting boolean,
|
|
||||||
xact_start timestamptz, query_start timestamptz,
|
|
||||||
backend_start timestamptz, client_addr inet, client_port int),
|
|
||||||
pg_authid U
|
|
||||||
WHERE S.datid = D.oid AND
|
WHERE S.datid = D.oid AND
|
||||||
S.usesysid = U.oid;
|
S.usesysid = U.oid;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.456 2008/05/07 14:41:55 mha Exp $
|
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.457 2008/05/08 08:58:59 mha Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -53,6 +53,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* yyyymmddN */
|
/* yyyymmddN */
|
||||||
#define CATALOG_VERSION_NO 200805071
|
#define CATALOG_VERSION_NO 200805081
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.497 2008/05/07 14:41:55 mha Exp $
|
* $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.498 2008/05/08 08:58:59 mha Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* The script catalog/genbki.sh reads this file and generates .bki
|
* The script catalog/genbki.sh reads this file and generates .bki
|
||||||
@ -2904,7 +2904,7 @@ DATA(insert OID = 2784 ( pg_stat_get_last_autoanalyze_time PGNSP PGUID 12 1 0 f
|
|||||||
DESCR("statistics: last auto analyze time for a table");
|
DESCR("statistics: last auto analyze time for a table");
|
||||||
DATA(insert OID = 1936 ( pg_stat_get_backend_idset PGNSP PGUID 12 1 100 f f t t s 0 23 "" _null_ _null_ _null_ pg_stat_get_backend_idset - _null_ _null_ ));
|
DATA(insert OID = 1936 ( pg_stat_get_backend_idset PGNSP PGUID 12 1 100 f f t t s 0 23 "" _null_ _null_ _null_ pg_stat_get_backend_idset - _null_ _null_ ));
|
||||||
DESCR("statistics: currently active backend IDs");
|
DESCR("statistics: currently active backend IDs");
|
||||||
DATA(insert OID = 2022 ( pg_stat_get_activity PGNSP PGUID 12 1 100 f f f t s 1 2249 "23" _null_ _null_ _null_ pg_stat_get_activity - _null_ _null_ ));
|
DATA(insert OID = 2022 ( pg_stat_get_activity PGNSP PGUID 12 1 100 f f f t s 1 2249 "23" "{23,26,23,26,25,16,1184,1184,1184,869,23}" "{i,o,o,o,o,o,o,o,o,o,o}" "{pid,datid,procpid,usesysid,current_query,waiting,xact_start,query_start,backend_start,client_addr,client_port}" pg_stat_get_activity - _null_ _null_ ));
|
||||||
DESCR("statistics: information about currently active backends");
|
DESCR("statistics: information about currently active backends");
|
||||||
DATA(insert OID = 2026 ( pg_backend_pid PGNSP PGUID 12 1 0 f f t f s 0 23 "" _null_ _null_ _null_ pg_backend_pid - _null_ _null_ ));
|
DATA(insert OID = 2026 ( pg_backend_pid PGNSP PGUID 12 1 0 f f t f s 0 23 "" _null_ _null_ _null_ pg_backend_pid - _null_ _null_ ));
|
||||||
DESCR("statistics: current backend PID");
|
DESCR("statistics: current backend PID");
|
||||||
|
Reference in New Issue
Block a user