File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ extern Datum pg_stat_get_blocks_fetched(PG_FUNCTION_ARGS);
1919extern Datum pg_stat_get_blocks_hit (PG_FUNCTION_ARGS );
2020
2121extern Datum pg_stat_get_backend_idset (PG_FUNCTION_ARGS );
22+ extern Datum pg_stat_get_backend_mypid (PG_FUNCTION_ARGS );
2223extern Datum pg_stat_get_backend_pid (PG_FUNCTION_ARGS );
2324extern Datum pg_stat_get_backend_dbid (PG_FUNCTION_ARGS );
2425extern Datum pg_stat_get_backend_userid (PG_FUNCTION_ARGS );
@@ -211,6 +212,13 @@ pg_stat_get_backend_idset(PG_FUNCTION_ARGS)
211212}
212213
213214
215+ Datum
216+ pg_stat_get_backend_mypid (PG_FUNCTION_ARGS )
217+ {
218+ PG_RETURN_INT32 (MyProcPid );
219+ }
220+
221+
214222Datum
215223pg_stat_get_backend_pid (PG_FUNCTION_ARGS )
216224{
Original file line number Diff line number Diff line change 77 * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
88 * Portions Copyright (c) 1994, Regents of the University of California
99 *
10- * $Id: pg_proc.h,v 1.246 2002/07/24 19:11:13 petere Exp $
10+ * $Id: pg_proc.h,v 1.247 2002/07/31 00:40:40 momjian Exp $
1111 *
1212 * NOTES
1313 * The script catalog/genbki.sh reads this file and generates .bki
@@ -2703,6 +2703,8 @@ DATA(insert OID = 1935 ( pg_stat_get_blocks_hit PGNSP PGUID 12 f f t f s 1 20
27032703DESCR ("Statistics: Number of blocks found in cache" );
27042704DATA (insert OID = 1936 ( pg_stat_get_backend_idset PGNSP PGUID 12 f f t t s 0 23 "" pg_stat_get_backend_idset - _null_ ));
27052705DESCR ("Statistics: Currently active backend IDs" );
2706+ DATA (insert OID = 2026 ( pg_stat_get_backend_mypid PGNSP PGUID 12 f f t f s 0 23 "" pg_stat_get_backend_mypid - _null_ ));
2707+ DESCR ("Statistics: My backend ID" );
27062708DATA (insert OID = 1937 ( pg_stat_get_backend_pid PGNSP PGUID 12 f f t f s 1 23 "23" pg_stat_get_backend_pid - _null_ ));
27072709DESCR ("Statistics: PID of backend" );
27082710DATA (insert OID = 1938 ( pg_stat_get_backend_dbid PGNSP PGUID 12 f f t f s 1 26 "23" pg_stat_get_backend_dbid - _null_ ));
You can’t perform that action at this time.
0 commit comments