mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-14 17:43:34 +08:00
Remove TimevalInfinity enum
This enum is used in no codepath.
This commit is contained in:
parent
396dd0cb11
commit
23a29631c4
@ -136,7 +136,7 @@ dimension_restrict_info_open_add(DimensionRestrictInfoOpen *dri, StrategyNumber
|
||||
PointerGetDatum(lfirst(item)),
|
||||
dimvalues->type,
|
||||
&restype);
|
||||
int64 value = ts_time_value_to_internal_or_infinite(datum, restype, NULL);
|
||||
int64 value = ts_time_value_to_internal_or_infinite(datum, restype);
|
||||
|
||||
switch (strategy)
|
||||
{
|
||||
|
15
src/utils.c
15
src/utils.c
@ -234,8 +234,7 @@ ts_integer_to_internal(Datum time_val, Oid type_oid)
|
||||
}
|
||||
|
||||
int64
|
||||
ts_time_value_to_internal_or_infinite(Datum time_val, Oid type_oid,
|
||||
TimevalInfinity *is_infinite_out)
|
||||
ts_time_value_to_internal_or_infinite(Datum time_val, Oid type_oid)
|
||||
{
|
||||
switch (type_oid)
|
||||
{
|
||||
@ -246,14 +245,10 @@ ts_time_value_to_internal_or_infinite(Datum time_val, Oid type_oid,
|
||||
{
|
||||
if (TIMESTAMP_IS_NOBEGIN(ts))
|
||||
{
|
||||
if (is_infinite_out != NULL)
|
||||
*is_infinite_out = TimevalNegInfinity;
|
||||
return PG_INT64_MIN;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_infinite_out != NULL)
|
||||
*is_infinite_out = TimevalPosInfinity;
|
||||
return PG_INT64_MAX;
|
||||
}
|
||||
}
|
||||
@ -267,14 +262,10 @@ ts_time_value_to_internal_or_infinite(Datum time_val, Oid type_oid,
|
||||
{
|
||||
if (TIMESTAMP_IS_NOBEGIN(ts))
|
||||
{
|
||||
if (is_infinite_out != NULL)
|
||||
*is_infinite_out = TimevalNegInfinity;
|
||||
return PG_INT64_MIN;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_infinite_out != NULL)
|
||||
*is_infinite_out = TimevalPosInfinity;
|
||||
return PG_INT64_MAX;
|
||||
}
|
||||
}
|
||||
@ -288,14 +279,10 @@ ts_time_value_to_internal_or_infinite(Datum time_val, Oid type_oid,
|
||||
{
|
||||
if (DATE_IS_NOBEGIN(d))
|
||||
{
|
||||
if (is_infinite_out != NULL)
|
||||
*is_infinite_out = TimevalNegInfinity;
|
||||
return PG_INT64_MIN;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_infinite_out != NULL)
|
||||
*is_infinite_out = TimevalPosInfinity;
|
||||
return PG_INT64_MAX;
|
||||
}
|
||||
}
|
||||
|
10
src/utils.h
10
src/utils.h
@ -46,13 +46,6 @@
|
||||
|
||||
extern TSDLLEXPORT bool ts_type_is_int8_binary_compatible(Oid sourcetype);
|
||||
|
||||
typedef enum TimevalInfinity
|
||||
{
|
||||
TimevalFinite = 0,
|
||||
TimevalNegInfinity = -1,
|
||||
TimevalPosInfinity = 1,
|
||||
} TimevalInfinity;
|
||||
|
||||
typedef bool (*proc_filter)(Form_pg_proc form, void *arg);
|
||||
|
||||
/*
|
||||
@ -63,8 +56,7 @@ typedef bool (*proc_filter)(Form_pg_proc form, void *arg);
|
||||
* Will throw an error for that, or other conversion issues.
|
||||
*/
|
||||
extern TSDLLEXPORT int64 ts_time_value_to_internal(Datum time_val, Oid type);
|
||||
extern int64 ts_time_value_to_internal_or_infinite(Datum time_val, Oid type_oid,
|
||||
TimevalInfinity *is_infinite_out);
|
||||
extern int64 ts_time_value_to_internal_or_infinite(Datum time_val, Oid type_oid);
|
||||
|
||||
extern TSDLLEXPORT int64 ts_interval_value_to_internal(Datum time_val, Oid type_oid);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user