mirror of
https://github.com/postgres/postgres.git
synced 2025-07-24 14:22:24 +03:00
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
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user