Skip to content

Commit e9f2f32

Browse files
committed
remove function search_range_partition_eq()
1 parent eb8bcec commit e9f2f32

File tree

2 files changed

+0
-61
lines changed

2 files changed

+0
-61
lines changed

src/include/pathman.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -165,19 +165,6 @@ void select_range_partitions(const Datum value,
165165
Oid collid,
166166
WrapperNode *result);
167167

168-
/* Result of search_range_partition_eq() */
169-
typedef enum
170-
{
171-
SEARCH_RANGEREL_OUT_OF_RANGE = 0,
172-
SEARCH_RANGEREL_GAP,
173-
SEARCH_RANGEREL_FOUND
174-
} search_rangerel_result;
175-
176-
search_rangerel_result search_range_partition_eq(const Datum value,
177-
FmgrInfo *cmp_func,
178-
const PartRelationInfo *prel,
179-
RangeEntry *out_re);
180-
181168

182169
/* Convert hash value to the partition index */
183170
static inline uint32

src/pg_pathman.c

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -572,54 +572,6 @@ select_range_partitions(const Datum value,
572572
}
573573
}
574574

575-
/* Fetch RangeEntry of RANGE partition which suits 'value' */
576-
search_rangerel_result
577-
search_range_partition_eq(const Datum value,
578-
FmgrInfo *cmp_func,
579-
const PartRelationInfo *prel,
580-
RangeEntry *out_re) /* returned RangeEntry */
581-
{
582-
RangeEntry *ranges;
583-
int nranges;
584-
WrapperNode result;
585-
586-
ranges = PrelGetRangesArray(prel);
587-
nranges = PrelChildrenCount(prel);
588-
589-
select_range_partitions(value,
590-
cmp_func,
591-
ranges,
592-
nranges,
593-
BTEqualStrategyNumber,
594-
prel->attcollid,
595-
&result); /* output */
596-
597-
if (result.found_gap)
598-
{
599-
return SEARCH_RANGEREL_GAP;
600-
}
601-
else if (result.rangeset == NIL)
602-
{
603-
return SEARCH_RANGEREL_OUT_OF_RANGE;
604-
}
605-
else
606-
{
607-
IndexRange irange = linitial_irange(result.rangeset);
608-
609-
Assert(list_length(result.rangeset) == 1);
610-
Assert(irange_lower(irange) == irange_upper(irange));
611-
Assert(is_irange_valid(irange));
612-
613-
/* Write result to the 'out_rentry' if necessary */
614-
if (out_re)
615-
memcpy((void *) out_re,
616-
(const void *) &ranges[irange_lower(irange)],
617-
sizeof(RangeEntry));
618-
619-
return SEARCH_RANGEREL_FOUND;
620-
}
621-
}
622-
623575

624576

625577
/*

0 commit comments

Comments
 (0)