Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd7d77f9

Browse files
committed
remove trash
1 parente961ef2 commitd7d77f9

File tree

2 files changed

+0
-80
lines changed

2 files changed

+0
-80
lines changed

‎range.sql

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -489,20 +489,6 @@ CREATE OR REPLACE FUNCTION @extschema@.generate_bounds(
489489
RETURNS ANYARRAYAS'pg_pathman','generate_bounds'
490490
LANGUAGE C;
491491

492-
-- CREATE OR REPLACE FUNCTION @extschema@.generate_bounds_by_range(
493-
-- p_startANYELEMENT,
494-
-- p_endANYELEMENT,
495-
-- p_intervalINTERVAL)
496-
-- RETURNS ANYARRAY AS 'pg_pathman', 'generate_bounds_by_range'
497-
-- LANGUAGE C;
498-
499-
-- CREATE OR REPLACE FUNCTION @extschema@.generate_bounds_by_range(
500-
-- p_startANYELEMENT,
501-
-- p_endANYELEMENT,
502-
-- p_intervalANYELEMENT)
503-
-- RETURNS ANYARRAY AS 'pg_pathman', 'generate_bounds_by_range'
504-
-- LANGUAGE C;
505-
506492

507493
/*
508494
* Split RANGE partition

‎src/pl_range_funcs.c

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ PG_FUNCTION_INFO_V1( validate_interval_value );
7171

7272
PG_FUNCTION_INFO_V1(create_range_partitions_internal );
7373
PG_FUNCTION_INFO_V1(generate_bounds );
74-
// PG_FUNCTION_INFO_V1( generate_bounds_by_range );
7574

7675

7776
/*
@@ -1171,68 +1170,3 @@ generate_bounds(PG_FUNCTION_ARGS)
11711170

11721171
PG_RETURN_ARRAYTYPE_P(arr);
11731172
}
1174-
1175-
1176-
// Datum
1177-
// generate_bounds_by_range(PG_FUNCTION_ARGS)
1178-
// {
1179-
// /* input params */
1180-
// Datumstart = PG_GETARG_DATUM(0);
1181-
// Datumend = PG_GETARG_DATUM(1);
1182-
// Oidv_type = get_fn_expr_argtype(fcinfo->flinfo, 0);
1183-
// Datuminterval = PG_GETARG_DATUM(2);
1184-
// Oidi_type = get_fn_expr_argtype(fcinfo->flinfo, 2);
1185-
// inti;
1186-
1187-
// /* operators */
1188-
// Oidplus_op_func;
1189-
// Datumplus_op_result;
1190-
// Oidplus_op_result_type;
1191-
1192-
// FmgrInfocmp_func;
1193-
1194-
// /* array */
1195-
// ArrayType *arr;
1196-
// int16elemlen;
1197-
// boolelembyval;
1198-
// charelemalign;
1199-
// Datum *datums;
1200-
// List *datum_list = NIL;
1201-
1202-
// /* Find suitable addition operator for given value and interval */
1203-
// extract_op_func_and_ret_type("+", v_type, i_type,
1204-
// &plus_op_func,
1205-
// &plus_op_result_type);
1206-
1207-
// /* Find comparison operator */
1208-
// fill_type_cmp_fmgr_info(&cmp_func,
1209-
// getBaseType(v_type),
1210-
// getBaseType(v_type));
1211-
1212-
// while (DatumGetInt32(FunctionCall2(cmp_func, start, end)) < 0)
1213-
// {
1214-
// /* Invoke addition operator and get a result */
1215-
// plus_op_result = OidFunctionCall2(plus_op_func, start, interval);
1216-
1217-
// if (plus_op_result_type != v_type)
1218-
// plus_op_result = perform_type_cast(plus_op_result,
1219-
// plus_op_result_type,
1220-
// v_type, NULL);
1221-
// start = plus_op_result;
1222-
// datum_list = lappend(datum_list, start);
1223-
// }
1224-
1225-
// datums = palloc(sizeof(Datum) * list_length(datum_list));
1226-
// foreach(lc, datum_list)
1227-
// datums[i++] = (Datum) lfirst(lc);
1228-
1229-
// /* build an array based on calculated datums */
1230-
// get_typlenbyvalalign(v_type, &elemlen, &elembyval, &elemalign);
1231-
// arr = construct_array(datums, count + 1, v_type,
1232-
// elemlen, elembyval, elemalign);
1233-
1234-
// pfree(datums);
1235-
// list_free(datum_list);
1236-
1237-
// PG_RETURN_ARRAYTYPE_P(arr);
1238-
// }

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp