mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Add function to access backend pid, pg_stat_get_backend_mypid.
This commit is contained in:
@ -19,6 +19,7 @@ extern Datum pg_stat_get_blocks_fetched(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_stat_get_blocks_hit(PG_FUNCTION_ARGS);
|
||||
|
||||
extern Datum pg_stat_get_backend_idset(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_stat_get_backend_mypid(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_stat_get_backend_pid(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_stat_get_backend_dbid(PG_FUNCTION_ARGS);
|
||||
extern Datum pg_stat_get_backend_userid(PG_FUNCTION_ARGS);
|
||||
@ -211,6 +212,13 @@ pg_stat_get_backend_idset(PG_FUNCTION_ARGS)
|
||||
}
|
||||
|
||||
|
||||
Datum
|
||||
pg_stat_get_backend_mypid(PG_FUNCTION_ARGS)
|
||||
{
|
||||
PG_RETURN_INT32(MyProcPid);
|
||||
}
|
||||
|
||||
|
||||
Datum
|
||||
pg_stat_get_backend_pid(PG_FUNCTION_ARGS)
|
||||
{
|
||||
|
Reference in New Issue
Block a user