Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove _timescaledb_internal.get_time_type #6004

Merged
merged 1 commit into from
Aug 23, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions sql/partitioning.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@ CREATE OR REPLACE FUNCTION _timescaledb_internal.get_partition_hash(val anyeleme
RETURNS int
AS '@MODULE_PATHNAME@', 'ts_get_partition_hash' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;

CREATE OR REPLACE FUNCTION _timescaledb_internal.get_time_type(hypertable_id INTEGER)
RETURNS OID
AS '@MODULE_PATHNAME@', 'ts_hypertable_get_time_type' LANGUAGE C STABLE STRICT;
3 changes: 3 additions & 0 deletions sql/updates/latest-dev.sql
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,6 @@ ALTER FUNCTION _timescaledb_internal.generate_uuid() SET SCHEMA _timescaledb_fun
ALTER FUNCTION _timescaledb_internal.get_git_commit() SET SCHEMA _timescaledb_functions;
ALTER FUNCTION _timescaledb_internal.get_os_info() SET SCHEMA _timescaledb_functions;
ALTER FUNCTION _timescaledb_internal.tsl_loaded() SET SCHEMA _timescaledb_functions;

DROP FUNCTION IF EXISTS _timescaledb_internal.get_time_type(integer);

22 changes: 0 additions & 22 deletions src/hypertable.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,28 +390,6 @@ ts_hypertable_relid_to_id(Oid relid)
return result;
}

TS_FUNCTION_INFO_V1(ts_hypertable_get_time_type);
Datum
ts_hypertable_get_time_type(PG_FUNCTION_ARGS)
{
int32 hypertable_id = PG_GETARG_INT32(0);
Cache *hcache = ts_hypertable_cache_pin();
Hypertable *ht = ts_hypertable_cache_get_entry_by_id(hcache, hypertable_id);
const Dimension *time_dimension;
Oid time_type;
if (ht == NULL)
PG_RETURN_NULL();
time_dimension = hyperspace_get_open_dimension(ht->space, 0);
if (time_dimension == NULL)
PG_RETURN_NULL();
/* This is deliberately column_type not partitioning_type, as that is how
* the SQL function is defined
*/
time_type = time_dimension->fd.column_type;
ts_cache_release(hcache);
PG_RETURN_OID(time_type);
}

static bool
hypertable_is_compressed_or_materialization(const Hypertable *ht)
{
Expand Down
1 change: 0 additions & 1 deletion tsl/test/shared/expected/extension.out
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ ORDER BY pronamespace::regnamespace::text COLLATE "C", p.oid::regprocedure::text
_timescaledb_internal.get_compressed_chunk_index_for_recompression(regclass)
_timescaledb_internal.get_partition_for_key(anyelement)
_timescaledb_internal.get_partition_hash(anyelement)
_timescaledb_internal.get_time_type(integer)
_timescaledb_internal.health()
_timescaledb_internal.hypertable_constraint_add_table_fk_constraint(name,name,name,integer)
_timescaledb_internal.hypertable_invalidation_log_delete(integer)
Expand Down