Summary
The pg_stat_user_functions view will contain one row for each tracked function, showing statistics about executions of that function. The track_functions parameter controls exactly which functions are tracked.
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_stat_user_functions statistics view exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
funcidoid
OID of a functionschemanamename
Name of the schema this function is infuncnamename
Name of this functioncallsbigint
Number of times this function has been calledtotal_timedouble precision
Total time spent in this function and all other functions called by it, in millisecondsself_timedouble precision
Total time spent in this function itself, not including other functions called by it, in millisecondsstats_resettimestamp with time zone
Time at which these statistics were last reset
Version applicability
Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.
Related & references
Reference: PostgreSQL documentation — pg_stat_user_functions.