From 84c741e5b13ab303ad703b0008be85daa69cc585 Mon Sep 17 00:00:00 2001 From: Piotr Klos Date: Mon, 18 Nov 2024 16:57:50 +0100 Subject: [PATCH] partition_steps name fix In psql17 partition_steps.name got schema attached and it brakes chunker. The change ensures that schema is not in the name. --- src/pgstac/sql/003b_partitions.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pgstac/sql/003b_partitions.sql b/src/pgstac/sql/003b_partitions.sql index 98b242a5..3ef9ee2a 100644 --- a/src/pgstac/sql/003b_partitions.sql +++ b/src/pgstac/sql/003b_partitions.sql @@ -95,7 +95,7 @@ CREATE UNIQUE INDEX ON partitions (partition); CREATE MATERIALIZED VIEW partition_steps AS SELECT - partition as name, + split_part(partition, '.', -1) AS name, date_trunc('month',lower(partition_dtrange)) as sdate, date_trunc('month', upper(partition_dtrange)) + '1 month'::interval as edate FROM partitions_view WHERE partition_dtrange IS NOT NULL AND partition_dtrange != 'empty'::tstzrange