Skip to content

Commit 379d44f

Browse files
committed
Remove time_bucket_ng
1 parent 438736f commit 379d44f

38 files changed

+35
-11399
lines changed

cmake/ScriptFiles.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ set(SOURCE_FILES
3636
ddl_triggers.sql
3737
bookend.sql
3838
time_bucket.sql
39-
time_bucket_ng.sql
4039
version.sql
4140
size_utils.sql
4241
histogram.sql

sql/cagg_migrate.sql

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,3 @@ BEGIN
596596
WHERE mat_hypertable_id OPERATOR(pg_catalog.=) _cagg_data.mat_hypertable_id;
597597
END;
598598
$BODY$;
599-
600-
-- Migrate a CAgg which is using the experimental time_bucket_ng function
601-
-- into a CAgg using the regular time_bucket function
602-
CREATE OR REPLACE PROCEDURE _timescaledb_functions.cagg_migrate_to_time_bucket(cagg REGCLASS)
603-
AS '@MODULE_PATHNAME@', 'ts_continuous_agg_migrate_to_time_bucket' LANGUAGE C;

sql/time_bucket_ng.sql

Lines changed: 0 additions & 60 deletions
This file was deleted.

sql/updates/latest-dev.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-- Remove time_bucket_ng functions
2+
DROP FUNCTION IF EXISTS timescaledb_experimental.time_bucket_ng(bucket_width INTERVAL, ts DATE);
3+
DROP FUNCTION IF EXISTS timescaledb_experimental.time_bucket_ng(bucket_width INTERVAL, ts DATE, origin DATE);
4+
DROP FUNCTION IF EXISTS timescaledb_experimental.time_bucket_ng(bucket_width INTERVAL, ts TIMESTAMP);
5+
DROP FUNCTION IF EXISTS timescaledb_experimental.time_bucket_ng(bucket_width INTERVAL, ts TIMESTAMP, origin TIMESTAMP);
6+
DROP FUNCTION IF EXISTS timescaledb_experimental.time_bucket_ng(bucket_width INTERVAL, ts TIMESTAMPTZ, timezone TEXT);
7+
DROP FUNCTION IF EXISTS timescaledb_experimental.time_bucket_ng(bucket_width INTERVAL, ts TIMESTAMPTZ, origin TIMESTAMPTZ, timezone TEXT);
8+
DROP FUNCTION IF EXISTS timescaledb_experimental.time_bucket_ng(bucket_width INTERVAL, ts TIMESTAMPTZ);
9+
DROP FUNCTION IF EXISTS timescaledb_experimental.time_bucket_ng(bucket_width INTERVAL, ts TIMESTAMPTZ, origin TIMESTAMPTZ);
10+
DROP PROCEDURE IF EXISTS _timescaledb_functions.cagg_migrate_to_time_bucket(cagg REGCLASS);

src/cross_module_fn.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ CROSSMODULE_WRAPPER(continuous_agg_invalidation_trigger);
8383
CROSSMODULE_WRAPPER(continuous_agg_refresh);
8484
CROSSMODULE_WRAPPER(continuous_agg_validate_query);
8585
CROSSMODULE_WRAPPER(continuous_agg_get_bucket_function);
86-
CROSSMODULE_WRAPPER(continuous_agg_migrate_to_time_bucket);
8786
CROSSMODULE_WRAPPER(cagg_try_repair);
8887

8988
CROSSMODULE_WRAPPER(chunk_freeze_chunk);
@@ -335,7 +334,6 @@ TSDLLEXPORT CrossModuleFunctions ts_cm_functions_default = {
335334
.continuous_agg_update_options = continuous_agg_update_options_default,
336335
.continuous_agg_validate_query = error_no_default_fn_pg_community,
337336
.continuous_agg_get_bucket_function = error_no_default_fn_pg_community,
338-
.continuous_agg_migrate_to_time_bucket = error_no_default_fn_pg_community,
339337
.cagg_try_repair = process_cagg_try_repair,
340338

341339
/* compression */

src/cross_module_fn.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ typedef struct CrossModuleFunctions
110110
WithClauseResult *with_clause_options);
111111
PGFunction continuous_agg_validate_query;
112112
PGFunction continuous_agg_get_bucket_function;
113-
PGFunction continuous_agg_migrate_to_time_bucket;
114113
PGFunction cagg_try_repair;
115114

116115
PGFunction compressed_data_send;

src/func_cache.c

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -363,66 +363,6 @@ static FuncInfo funcinfo[] = {
363363
.group_estimate = time_bucket_group_estimate,
364364
.sort_transform = time_bucket_tz_sort_transform,
365365
},
366-
{
367-
.origin = ORIGIN_TIMESCALE_EXPERIMENTAL,
368-
.is_bucketing_func = true,
369-
.allowed_in_cagg_definition = false,
370-
.funcname = "time_bucket_ng",
371-
.nargs = 2,
372-
.arg_types = { INTERVALOID, DATEOID },
373-
.group_estimate = time_bucket_group_estimate,
374-
.sort_transform = time_bucket_sort_transform,
375-
},
376-
{
377-
.origin = ORIGIN_TIMESCALE_EXPERIMENTAL,
378-
.is_bucketing_func = true,
379-
.allowed_in_cagg_definition = false,
380-
.funcname = "time_bucket_ng",
381-
.nargs = 3,
382-
.arg_types = { INTERVALOID, DATEOID, DATEOID },
383-
.group_estimate = time_bucket_group_estimate,
384-
.sort_transform = time_bucket_sort_transform,
385-
},
386-
{
387-
.origin = ORIGIN_TIMESCALE_EXPERIMENTAL,
388-
.is_bucketing_func = true,
389-
.allowed_in_cagg_definition = false,
390-
.funcname = "time_bucket_ng",
391-
.nargs = 2,
392-
.arg_types = { INTERVALOID, TIMESTAMPOID },
393-
.group_estimate = time_bucket_group_estimate,
394-
.sort_transform = time_bucket_sort_transform,
395-
},
396-
{
397-
.origin = ORIGIN_TIMESCALE_EXPERIMENTAL,
398-
.is_bucketing_func = true,
399-
.allowed_in_cagg_definition = false,
400-
.funcname = "time_bucket_ng",
401-
.nargs = 3,
402-
.arg_types = { INTERVALOID, TIMESTAMPOID, TIMESTAMPOID },
403-
.group_estimate = time_bucket_group_estimate,
404-
.sort_transform = time_bucket_sort_transform,
405-
},
406-
{
407-
.origin = ORIGIN_TIMESCALE_EXPERIMENTAL,
408-
.is_bucketing_func = true,
409-
.allowed_in_cagg_definition = false,
410-
.funcname = "time_bucket_ng",
411-
.nargs = 3,
412-
.arg_types = { INTERVALOID, TIMESTAMPTZOID, TEXTOID },
413-
.group_estimate = time_bucket_group_estimate,
414-
.sort_transform = time_bucket_sort_transform,
415-
},
416-
{
417-
.origin = ORIGIN_TIMESCALE_EXPERIMENTAL,
418-
.is_bucketing_func = true,
419-
.allowed_in_cagg_definition = false,
420-
.funcname = "time_bucket_ng",
421-
.nargs = 4,
422-
.arg_types = { INTERVALOID, TIMESTAMPTZOID, TIMESTAMPTZOID, TEXTOID },
423-
.group_estimate = time_bucket_group_estimate,
424-
.sort_transform = time_bucket_sort_transform,
425-
},
426366
{
427367
.origin = ORIGIN_TIMESCALE,
428368
.is_bucketing_func = true,

src/guc.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ char *ts_last_tune_time = NULL;
9999
char *ts_last_tune_version = NULL;
100100

101101
bool ts_guc_debug_require_batch_sorted_merge = false;
102-
bool ts_guc_debug_allow_cagg_with_deprecated_funcs = false;
103102

104103
#ifdef TS_DEBUG
105104
bool ts_shutdown_bgw = false;
@@ -847,17 +846,6 @@ _guc_init(void)
847846
/* check_hook= */ NULL,
848847
/* assign_hook= */ NULL,
849848
/* show_hook= */ NULL);
850-
851-
DefineCustomBoolVariable(/* name= */ MAKE_EXTOPTION("debug_allow_cagg_with_deprecated_funcs"),
852-
/* short_desc= */ "allow new caggs using time_bucket_ng",
853-
/* long_desc= */ "this is for debugging/testing purposes",
854-
/* valueAddr= */ &ts_guc_debug_allow_cagg_with_deprecated_funcs,
855-
/* bootValue= */ false,
856-
/* context= */ PGC_USERSET,
857-
/* flags= */ 0,
858-
/* check_hook= */ NULL,
859-
/* assign_hook= */ NULL,
860-
/* show_hook= */ NULL);
861849
#endif
862850

863851
/* register feature flags */

src/guc.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ extern TSDLLEXPORT bool ts_guc_debug_compression_path_info;
8585

8686
extern TSDLLEXPORT bool ts_guc_debug_require_batch_sorted_merge;
8787

88-
extern TSDLLEXPORT bool ts_guc_debug_allow_cagg_with_deprecated_funcs;
89-
9088
void _guc_init(void);
9189

9290
typedef enum

0 commit comments

Comments
 (0)