Skip to content

Commit

Permalink
Remove legacy functions
Browse files Browse the repository at this point in the history
Remove _timescaledb_internal.time_col_name_for_chunk and
_timescaledb_internal.time_col_type_for_chunk functions.

Fixes #3539
  • Loading branch information
gayyappan committed Sep 2, 2021
1 parent 73cc9c5 commit dfc63fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 43 deletions.
43 changes: 0 additions & 43 deletions sql/schema_info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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$;
2 changes: 2 additions & 0 deletions sql/updates/latest-dev.sql
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit dfc63fe

Please sign in to comment.