From 38f809d4b5fa6ce91bdcad4b1c36d6837db4d4dc Mon Sep 17 00:00:00 2001 From: Konstantina Skovola Date: Thu, 7 Sep 2023 16:30:45 +0300 Subject: [PATCH] Move view creation in setup.repair inside if Previously the view was created outside the if, leading to an unexpected error when attempting to drop a dependency of the view in the extension upgrade script. --- test/sql/updates/setup.repair.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/sql/updates/setup.repair.sql b/test/sql/updates/setup.repair.sql index 39bd00dd853..975ca01f04a 100644 --- a/test/sql/updates/setup.repair.sql +++ b/test/sql/updates/setup.repair.sql @@ -65,6 +65,8 @@ INSERT INTO repair_test_date VALUES ALTER TABLE _timescaledb_catalog.chunk_constraint DROP CONSTRAINT chunk_constraint_dimension_slice_id_fkey; +\if :test_repair_dimension + CREATE VIEW slices AS ( SELECT ch.hypertable_id, ( @@ -88,7 +90,6 @@ CREATE VIEW slices AS ( ON di.hypertable_id = ch.hypertable_id AND attname = di.column_name ); -\if :test_repair_dimension -- Break the first time dimension on each table. These are different -- depending on the time type for the table and we need to check all -- versions.