From fd3f9378ac8ed616336e7a018ab70ff8ad9bede4 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 72394c45e..659820945 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file. From versio - Fix unexpected results when embedding and filtering the same table more than once by @laurenceisla in #4075 - 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 ### Changed diff --git a/docs/references/observability.rst b/docs/references/observability.rst index 0c40d7ff5..605687aeb 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 bd1e849ea..67063d52d 100644 --- a/src/PostgREST/SchemaCache.hs +++ b/src/PostgREST/SchemaCache.hs @@ -108,7 +108,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"