From e25a87bd84d074261dd6ab28b829e39eb54e90bc Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Mon, 4 May 2026 20:08:52 +0500 Subject: [PATCH] fix: functions count in startup logs not counting overloaded functions Renames the "Functions" in the logs to "RPCs". This clarifies that we log number of callable functions and not the number of SQL objects. Signed-off-by: Taimoor Zaeem --- CHANGELOG.md | 1 + docs/references/observability.rst | 2 +- src/PostgREST/SchemaCache.hs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb1b248bd..13a3b9e32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. From versio - Fix login with uppercase and mixed case role names by @taimoorzaeem in #4678 - Restore Listener query shape so it can be found in `pg_stat_activity` by @mkleczek in #4857 #4859 - The LISTEN channel now automatically recovers when it stops working due to a PostgreSQL bug @laurenceisla in #3147 +- Fix misleading "Functions" name on schema cache summary in startup logs by @taimoorzaeem in #4821 ## [14.10] - 2026-04-16 diff --git a/docs/references/observability.rst b/docs/references/observability.rst index 2a06598db..d5f8427dc 100644 --- a/docs/references/observability.rst +++ b/docs/references/observability.rst @@ -39,7 +39,7 @@ For diagnostic information about the server itself, PostgREST logs to ``stderr`` 06/May/2024:08:16:11 -0500: Listening for database notifications on the "pgrst" channel 06/May/2024:08:16:11 -0500: Config reloaded 06/May/2024:08:16:11 -0500: Schema cache queried in 3.8 milliseconds - 06/May/2024:08:16:11 -0500: Schema cache loaded 15 Relations, 8 Relationships, 8 Functions, 0 Domain Representations, 4 Media Type Handlers + 06/May/2024:08:16:11 -0500: Schema cache loaded 15 Relations, 8 Relationships, 8 RPCs, 0 Domain Representations, 4 Media Type Handlers 06/May/2024:14:11:27 -0500: Received a config reload message on the "pgrst" channel 06/May/2024:14:11:27 -0500: Config reloaded diff --git a/src/PostgREST/SchemaCache.hs b/src/PostgREST/SchemaCache.hs index f69ec8824..e7763de96 100644 --- a/src/PostgREST/SchemaCache.hs +++ b/src/PostgREST/SchemaCache.hs @@ -102,7 +102,7 @@ showSummary (SchemaCache tbls rels routs reps mediaHdlrs tzs _) = T.intercalate ", " [ show (HM.size tbls) <> " Relations" , show (HM.size rels) <> " Relationships" - , show (HM.size routs) <> " Functions" + , show (HM.size routs) <> " RPCs" , show (HM.size reps) <> " Domain Representations" , show (HM.size mediaHdlrs) <> " Media Type Handlers" , show (S.size tzs) <> " Timezones"