From fc743300d5e62ce567f7260d205e4b9e383e16f4 Mon Sep 17 00:00:00 2001 From: Maksim Dimitrov Date: Tue, 16 Dec 2025 22:02:10 +0200 Subject: [PATCH] store: Fix histogram_bounds query Signed-off-by: Maksim Dimitrov --- store/postgres/src/catalog.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/postgres/src/catalog.rs b/store/postgres/src/catalog.rs index 455fb6fe29b..5f094548565 100644 --- a/store/postgres/src/catalog.rs +++ b/store/postgres/src/catalog.rs @@ -1110,7 +1110,7 @@ pub(crate) async fn histogram_bounds( table: &SqlName, column: &str, ) -> Result, StoreError> { - const QUERY: &str = "select histogram_bounds::text::int8[] bounds \ + const QUERY: &str = "select coalesce(histogram_bounds::text::int8[], '{}'::int8[]) as bounds \ from pg_stats \ where schemaname = $1 \ and tablename = $2 \