From 0335b465d7b4442a119be0e27608638c69c114e1 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 7 Jul 2024 18:08:41 +0200 Subject: [PATCH] fix: Show number of loaded timezones in log output There is no reason to hide those, right? --- CHANGELOG.md | 1 + src/PostgREST/SchemaCache.hs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd6bccda8..bd286a051 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - #3093, Nested empty embeds no longer show empty values and are correctly omitted - @laurenceisla - #3644, Make --dump-schema work with in-database pgrst.db_schemas setting - @wolfgangwalther + - #3644, Show number of timezones in schema cache load report - @wolfgangwalther ### Changed diff --git a/src/PostgREST/SchemaCache.hs b/src/PostgREST/SchemaCache.hs index a34329237..39716d913 100644 --- a/src/PostgREST/SchemaCache.hs +++ b/src/PostgREST/SchemaCache.hs @@ -91,13 +91,14 @@ instance JSON.ToJSON SchemaCache where ] showSummary :: SchemaCache -> Text -showSummary (SchemaCache tbls rels routs reps mediaHdlrs _) = +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 reps) <> " Domain Representations" , show (HM.size mediaHdlrs) <> " Media Type Handlers" + , show (S.size tzs) <> " Timezones" ] -- | A view foreign key or primary key dependency detected on its source table