From e731aeac8928592435f73465a03fae83a2db0ee2 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Thu, 16 Mar 2023 14:22:34 +0900 Subject: 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 --- src/backend/utils/adt/pgstatfuncs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/backend/utils/adt/pgstatfuncs.c') 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)); } -- cgit v1.2.3