mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-15 18:13:18 +08:00
A chunk in frozen state cannot be dropped. drop_chunks will skip over frozen chunks without erroring. Internal api , drop_chunk will error if you attempt to drop a chunk without unfreezing it. This PR also adds a new internal API to unfreeze a chunk.
21 lines
1.2 KiB
SQL
21 lines
1.2 KiB
SQL
DROP FUNCTION IF EXISTS @extschema@.add_retention_policy(REGCLASS, "any", BOOL, INTERVAL);
|
|
CREATE FUNCTION @extschema@.add_retention_policy(relation REGCLASS, drop_after "any", if_not_exists BOOL = false)
|
|
RETURNS INTEGER AS '@MODULE_PATHNAME@', 'ts_policy_retention_add' LANGUAGE C VOLATILE STRICT;
|
|
|
|
DROP FUNCTION IF EXISTS @extschema@.add_compression_policy(REGCLASS, "any", BOOL, INTERVAL);
|
|
CREATE FUNCTION @extschema@.add_compression_policy(hypertable REGCLASS, compress_after "any", if_not_exists BOOL = false)
|
|
RETURNS INTEGER AS '@MODULE_PATHNAME@', 'ts_policy_compression_add' LANGUAGE C VOLATILE STRICT;
|
|
DROP FUNCTION IF EXISTS @extschema@.detach_data_node;
|
|
CREATE FUNCTION @extschema@.detach_data_node(
|
|
node_name NAME,
|
|
hypertable REGCLASS = NULL,
|
|
if_attached BOOLEAN = FALSE,
|
|
force BOOLEAN = FALSE,
|
|
repartition BOOLEAN = TRUE
|
|
) RETURNS INTEGER
|
|
AS '@MODULE_PATHNAME@', 'ts_data_node_detach' LANGUAGE C VOLATILE;
|
|
|
|
DROP FUNCTION _timescaledb_internal.attach_osm_table_chunk( hypertable REGCLASS, chunk REGCLASS);
|
|
DROP FUNCTION _timescaledb_internal.alter_job_set_hypertable_id( job_id INTEGER, hypertable REGCLASS );
|
|
DROP FUNCTION _timescaledb_internal.unfreeze_chunk( chunk REGCLASS);
|