Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita6d6a9c

Browse files
committed
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.
1 parent9c9732e commita6d6a9c

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

‎src/backend/catalog/system_views.sql

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 1996-2008, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.50 2008/05/07 14:41:55 mha Exp $
6+
* $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.51 2008/05/08 08:58:59 mha Exp $
77
*/
88

99
CREATEVIEWpg_rolesAS
@@ -353,12 +353,7 @@ CREATE VIEW pg_stat_activity AS
353353
S.backend_start,
354354
S.client_addr,
355355
S.client_port
356-
FROM pg_database D,
357-
pg_stat_get_activity(NULL)AS S(datidoid, procpidint,
358-
usesysidoid, current_querytext, waitingboolean,
359-
xact_starttimestamptz, query_starttimestamptz,
360-
backend_starttimestamptz, client_addrinet, client_portint),
361-
pg_authid U
356+
FROM pg_database D, pg_stat_get_activity(NULL)AS S, pg_authid U
362357
WHERES.datid=D.oidAND
363358
S.usesysid=U.oid;
364359

‎src/include/catalog/catversion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
3838
* Portions Copyright (c) 1994, Regents of the University of California
3939
*
40-
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.456 2008/05/07 14:41:55 mha Exp $
40+
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.457 2008/05/08 08:58:59 mha Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO200805071
56+
#defineCATALOG_VERSION_NO200805081
5757

5858
#endif

‎src/include/catalog/pg_proc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.497 2008/05/07 14:41:55 mha Exp $
10+
* $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.498 2008/05/08 08:58:59 mha Exp $
1111
*
1212
* NOTES
1313
* 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
29042904
DESCR("statistics: last auto analyze time for a table");
29052905
DATA(insertOID=1936 (pg_stat_get_backend_idsetPGNSPPGUID121100fftts023""_null__null__null_pg_stat_get_backend_idset-_null__null_ ));
29062906
DESCR("statistics: currently active backend IDs");
2907-
DATA(insertOID=2022 (pg_stat_get_activityPGNSPPGUID121100fffts12249"23"_null__null__null_pg_stat_get_activity-_null__null_ ));
2907+
DATA(insertOID=2022 (pg_stat_get_activityPGNSPPGUID121100fffts12249"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_ ));
29082908
DESCR("statistics: information about currently active backends");
29092909
DATA(insertOID=2026 (pg_backend_pidPGNSPPGUID1210fftfs023""_null__null__null_pg_backend_pid-_null__null_ ));
29102910
DESCR("statistics: current backend PID");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp