Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/ScriptFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ set(SOURCE_FILES
uuidv7.sql
ts_stats.sql
views.sql
views_compat.sql
views_experimental.sql
gapfill.sql
compression.sql
Expand Down
8 changes: 3 additions & 5 deletions sql/updates/reverse-dev.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
-- The PL/pgSQL helper switched to scalar args in the forward direction;
-- drop it so the target version's chunk_constraint.sql can restore the
-- row-typed signature.
DROP FUNCTION IF EXISTS _timescaledb_functions.chunk_constraint_add_table_constraint(
integer, name, name);

DROP VIEW IF EXISTS _timescaledb_catalog.chunk_constraint;
DROP FUNCTION IF EXISTS _timescaledb_functions.chunk_constraint_add_table_constraint( integer, name, name);

-- Recreate the chunk_constraint catalog table.
CREATE TABLE _timescaledb_catalog.chunk_constraint (
Expand Down
6 changes: 0 additions & 6 deletions sql/views.sql
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,6 @@ AS SELECT * FROM timescaledb_information.hypertable_compression_settings;
CREATE OR REPLACE VIEW timescaledb_information.chunk_columnstore_settings AS
SELECT * FROM timescaledb_information.chunk_compression_settings;

--temporary alias for bgw_job
CREATE OR REPLACE VIEW _timescaledb_config.bgw_job AS
SELECT * from _timescaledb_catalog.bgw_job;

-- chunk statistics view
CREATE OR REPLACE VIEW timescaledb_information.stat_chunk_activity AS
SELECT
Expand Down Expand Up @@ -496,6 +492,4 @@ LEFT JOIN _timescaledb_catalog.chunk c
ON format('%I.%I', c.schema_name, c.table_name)::regclass = o.uncompressed_relid
LEFT JOIN _timescaledb_catalog.hypertable h ON h.id = c.hypertable_id;


GRANT SELECT ON ALL TABLES IN SCHEMA _timescaledb_config TO PUBLIC;
GRANT SELECT ON ALL TABLES IN SCHEMA timescaledb_information TO PUBLIC;
18 changes: 18 additions & 0 deletions sql/views_compat.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-- This file and its contents are licensed under the Apache License 2.0.
-- Please see the included NOTICE for copyright information and
-- LICENSE-APACHE for a copy of the license.

-- temporary views for compatibility

CREATE OR REPLACE VIEW _timescaledb_config.bgw_job AS
SELECT * from _timescaledb_catalog.bgw_job;

CREATE OR REPLACE VIEW _timescaledb_catalog.chunk_constraint AS
SELECT
chunk_id,
id AS dimension_slice_id,
format('constraint_%s',id) AS constraint_name,
NULL::text AS hypertable_constraint_name from _timescaledb_catalog.dimension_slice;

GRANT SELECT ON ALL TABLES IN SCHEMA _timescaledb_config TO PUBLIC;
GRANT SELECT ON ALL TABLES IN SCHEMA _timescaledb_catalog TO PUBLIC;
1 change: 1 addition & 0 deletions test/expected/drop_rename_hypertable.out
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ SELECT schema, name FROM test.relation WHERE schema IN ('public', '_timescaledb_
_timescaledb_catalog | bgw_job
_timescaledb_catalog | chunk
_timescaledb_catalog | chunk_column_stats
_timescaledb_catalog | chunk_constraint
_timescaledb_catalog | chunk_rewrite
_timescaledb_catalog | compression_algorithm
_timescaledb_catalog | compression_chunk_size
Expand Down
1 change: 1 addition & 0 deletions test/expected/pg_dump.out
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ WHERE refclassid = 'pg_catalog.pg_extension'::pg_catalog.regclass AND
_timescaledb_cache.cache_inval_bgw_job
_timescaledb_cache.cache_inval_extension
_timescaledb_cache.cache_inval_hypertable
_timescaledb_catalog.chunk_constraint
_timescaledb_catalog.chunk_rewrite
_timescaledb_catalog.compression_algorithm
_timescaledb_catalog.tablespace_id_seq
Expand Down
Loading