From dfc63fe0634e6987d361019c6e2e90a8c2d7eb94 Mon Sep 17 00:00:00 2001 From: gayyappan Date: Wed, 1 Sep 2021 12:14:02 -0400 Subject: [PATCH] Remove legacy functions Remove _timescaledb_internal.time_col_name_for_chunk and _timescaledb_internal.time_col_type_for_chunk functions. Fixes #3539 --- sql/schema_info.sql | 43 -------------------------------------- sql/updates/latest-dev.sql | 2 ++ 2 files changed, 2 insertions(+), 43 deletions(-) diff --git a/sql/schema_info.sql b/sql/schema_info.sql index 4defc807067..4c95c8df4d2 100644 --- a/sql/schema_info.sql +++ b/sql/schema_info.sql @@ -55,46 +55,3 @@ $BODY$ FROM _timescaledb_catalog.hypertable h WHERE id = hypertable_id; $BODY$; - - --- Get the name of the time column for a chunk. --- --- schema_name, table_name - name of the schema and table for the table represented by the crn. -CREATE OR REPLACE FUNCTION _timescaledb_internal.time_col_name_for_chunk( - schema_name NAME, - table_name NAME -) - RETURNS NAME LANGUAGE PLPGSQL STABLE AS -$BODY$ -DECLARE - time_col_name NAME; -BEGIN - SELECT h.time_column_name INTO STRICT time_col_name - FROM _timescaledb_catalog.hypertable h - INNER JOIN _timescaledb_catalog.chunk c ON (c.hypertable_id = h.id) - WHERE c.schema_name = time_col_name_for_chunk.schema_name AND - c.table_name = time_col_name_for_chunk.table_name; - RETURN time_col_name; -END -$BODY$; - --- Get the type of the time column for a chunk. --- --- schema_name, table_name - name of the schema and table for the table represented by the crn. -CREATE OR REPLACE FUNCTION _timescaledb_internal.time_col_type_for_chunk( - schema_name NAME, - table_name NAME -) - RETURNS REGTYPE LANGUAGE PLPGSQL STABLE AS -$BODY$ -DECLARE - time_col_type REGTYPE; -BEGIN - SELECT h.time_column_type INTO STRICT time_col_type - FROM _timescaledb_catalog.hypertable h - INNER JOIN _timescaledb_catalog.chunk c ON (c.hypertable_id = h.id) - WHERE c.schema_name = time_col_type_for_chunk.schema_name AND - c.table_name = time_col_type_for_chunk.table_name; - RETURN time_col_type; -END -$BODY$; diff --git a/sql/updates/latest-dev.sql b/sql/updates/latest-dev.sql index e69de29bb2d..e6373540f5e 100644 --- a/sql/updates/latest-dev.sql +++ b/sql/updates/latest-dev.sql @@ -0,0 +1,2 @@ +DROP FUNCTION _timescaledb_internal.time_col_name_for_chunk(name,name); +DROP FUNCTION _timescaledb_internal.time_col_type_for_chunk(name,name);