mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 18:43:18 +08:00
The current hypertable creation interface is heavily focused on a time column, but since hypertables are focused on partitioning of not only time columns, we introduce a more generic API that support different types of keys for partitioning. The new interface introduced new versions of create_hypertable, add_dimension, and a replacement function `set_partitioning_interval` that replaces `set_chunk_time_interval`. The new functions accept an instance of dimension_info that can be constructed using constructor functions `by_range` and `by_hash`, allowing a more versatile and future-proof API. For examples: SELECT create_hypertable('conditions', by_range('time')); SELECT add_dimension('conditions', by_hash('device')); The old API remains, but will eventually be deprecated.
9 lines
534 B
SQL
9 lines
534 B
SQL
-- API changes related to hypertable generalization
|
|
DROP FUNCTION IF EXISTS @extschema@.add_dimension(regclass,dimension_info,boolean);
|
|
DROP FUNCTION IF EXISTS @extschema@.create_hypertable(regclass,dimension_info,boolean,boolean,boolean);
|
|
DROP FUNCTION IF EXISTS @extschema@.set_partitioning_interval(regclass,anyelement,name);
|
|
DROP FUNCTION IF EXISTS @extschema@.by_hash(name,integer,regproc);
|
|
DROP FUNCTION IF EXISTS @extschema@.by_range(name,anyelement,regproc);
|
|
|
|
DROP TYPE IF EXISTS _timescaledb_internal.dimension_info CASCADE;
|