aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/pgstatfuncs.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-03-16 14:22:34 +0900
committerMichael Paquier <michael@paquier.xyz>2023-03-16 14:22:34 +0900
commite731aeac8928592435f73465a03fae83a2db0ee2 (patch)
tree374c80815d1c0baa923f00af7ebb7bc12e333d99 /src/backend/utils/adt/pgstatfuncs.c
parente643a315fc58deae20877e2e69358c95087fa09a (diff)
downloadpostgresql-e731aeac8928592435f73465a03fae83a2db0ee2.tar.gz
postgresql-e731aeac8928592435f73465a03fae83a2db0ee2.zip
Remove PgStat_BackendFunctionEntry
This structure included only PgStat_FunctionCounts, and removing it facilitates some upcoming refactoring for pgstatfuncs.c to use more macros rather that mostly-duplicated functions. Author: Bertrand Drouvot Reviewed-by: Nathan Bossart Discussion: https://postgr.es/m/11d531fe-52fc-c6ea-7e8e-62f1b6ec626e@gmail.com
Diffstat (limited to 'src/backend/utils/adt/pgstatfuncs.c')
-rw-r--r--src/backend/utils/adt/pgstatfuncs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index b61a12382b3..35c6d465553 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1652,33 +1652,33 @@ Datum
pg_stat_get_xact_function_calls(PG_FUNCTION_ARGS)
{
Oid funcid = PG_GETARG_OID(0);
- PgStat_BackendFunctionEntry *funcentry;
+ PgStat_FunctionCounts *funcentry;
if ((funcentry = find_funcstat_entry(funcid)) == NULL)
PG_RETURN_NULL();
- PG_RETURN_INT64(funcentry->f_counts.f_numcalls);
+ PG_RETURN_INT64(funcentry->f_numcalls);
}
Datum
pg_stat_get_xact_function_total_time(PG_FUNCTION_ARGS)
{
Oid funcid = PG_GETARG_OID(0);
- PgStat_BackendFunctionEntry *funcentry;
+ PgStat_FunctionCounts *funcentry;
if ((funcentry = find_funcstat_entry(funcid)) == NULL)
PG_RETURN_NULL();
- PG_RETURN_FLOAT8(INSTR_TIME_GET_MILLISEC(funcentry->f_counts.f_total_time));
+ PG_RETURN_FLOAT8(INSTR_TIME_GET_MILLISEC(funcentry->f_total_time));
}
Datum
pg_stat_get_xact_function_self_time(PG_FUNCTION_ARGS)
{
Oid funcid = PG_GETARG_OID(0);
- PgStat_BackendFunctionEntry *funcentry;
+ PgStat_FunctionCounts *funcentry;
if ((funcentry = find_funcstat_entry(funcid)) == NULL)
PG_RETURN_NULL();
- PG_RETURN_FLOAT8(INSTR_TIME_GET_MILLISEC(funcentry->f_counts.f_self_time));
+ PG_RETURN_FLOAT8(INSTR_TIME_GET_MILLISEC(funcentry->f_self_time));
}