summaryrefslogtreecommitdiff
path: root/src/test/regress
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2025-10-08 12:43:40 +0900
committerMichael Paquier <michael@paquier.xyz>2025-10-08 12:43:40 +0900
commitb71bae41a0cdda879db39d9946d2cc4af910bed1 (patch)
tree2a92bc7489ef681fede095f08e46a4dcf4d856d1 /src/test/regress
parent035b09131daab84f2ed9a4a3f766bf4781fd5cbf (diff)
Add stats_reset to pg_stat_user_functions
It is possible to call pg_stat_reset_single_function_counters() for a single function, but the reset time was missing the system view showing its statistics. Like all the fields of pg_stat_user_functions, the GUC track_functions needs to be enabled to show the statistics about function executions. Bump catalog version. Bump PGSTAT_FILE_FORMAT_ID, as a result of the new field added to PgStat_StatFuncEntry. Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Discussion: https://postgr.es/m/aONjnsaJSx-nEdfU@paquier.xyz
Diffstat (limited to 'src/test/regress')
-rw-r--r--src/test/regress/expected/rules.out3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/regress/expected/rules.out b/src/test/regress/expected/rules.out
index 7f1cb3bb4af..8859a5a885f 100644
--- a/src/test/regress/expected/rules.out
+++ b/src/test/regress/expected/rules.out
@@ -2244,7 +2244,8 @@ pg_stat_user_functions| SELECT p.oid AS funcid,
p.proname AS funcname,
pg_stat_get_function_calls(p.oid) AS calls,
pg_stat_get_function_total_time(p.oid) AS total_time,
- pg_stat_get_function_self_time(p.oid) AS self_time
+ pg_stat_get_function_self_time(p.oid) AS self_time,
+ pg_stat_get_function_stat_reset_time(p.oid) AS stats_reset
FROM (pg_proc p
LEFT JOIN pg_namespace n ON ((n.oid = p.pronamespace)))
WHERE ((p.prolang <> (12)::oid) AND (pg_stat_get_function_calls(p.oid) IS NOT NULL));