PostgreSQL Source Code git master
|
Go to the source code of this file.
Data Structures | |
struct | MultirangeType |
Macros | |
#define | MultirangeTypeGetOid(mr) ((mr)->multirangetypid) |
#define | MultirangeIsEmpty(mr) ((mr)->rangeCount == 0) |
#define | PG_GETARG_MULTIRANGE_P(n) DatumGetMultirangeTypeP(PG_GETARG_DATUM(n)) |
#define | PG_GETARG_MULTIRANGE_P_COPY(n) DatumGetMultirangeTypePCopy(PG_GETARG_DATUM(n)) |
#define | PG_RETURN_MULTIRANGE_P(x) return MultirangeTypePGetDatum(x) |
#define MultirangeIsEmpty | ( | mr | ) | ((mr)->rangeCount == 0) |
Definition at line 42 of file multirangetypes.h.
#define MultirangeTypeGetOid | ( | mr | ) | ((mr)->multirangetypid) |
Definition at line 41 of file multirangetypes.h.
#define PG_GETARG_MULTIRANGE_P | ( | n | ) | DatumGetMultirangeTypeP(PG_GETARG_DATUM(n)) |
Definition at line 65 of file multirangetypes.h.
#define PG_GETARG_MULTIRANGE_P_COPY | ( | n | ) | DatumGetMultirangeTypePCopy(PG_GETARG_DATUM(n)) |
Definition at line 66 of file multirangetypes.h.
#define PG_RETURN_MULTIRANGE_P | ( | x | ) | return MultirangeTypePGetDatum(x) |
Definition at line 67 of file multirangetypes.h.
|
inlinestatic |
Definition at line 48 of file multirangetypes.h.
References PG_DETOAST_DATUM.
Referenced by compute_range_stats(), ExecWithoutOverlapsNotEmpty(), multirange_gist_compress(), multirange_gist_consistent(), multirangesel(), and range_gist_consistent().
|
inlinestatic |
MultirangeType * make_empty_multirange | ( | Oid | mltrngtypoid, |
TypeCacheEntry * | rangetyp | ||
) |
Definition at line 848 of file multirangetypes.c.
References make_multirange().
Referenced by multirange_intersect().
MultirangeType * make_multirange | ( | Oid | mltrngtypoid, |
TypeCacheEntry * | rangetyp, | ||
int32 | range_count, | ||
RangeType ** | ranges | ||
) |
Definition at line 646 of file multirangetypes.c.
References multirange_canonicalize(), multirange_size_estimate(), MultirangeType::multirangetypid, palloc0(), MultirangeType::rangeCount, SET_VARSIZE, size, and write_multirange_data().
Referenced by make_empty_multirange(), multirange_constructor0(), multirange_constructor1(), multirange_constructor2(), multirange_in(), multirange_intersect_internal(), multirange_minus_internal(), multirange_recv(), multirange_union(), multirangesel(), and range_agg_finalfn().
bool multirange_before_multirange_internal | ( | TypeCacheEntry * | rangetyp, |
const MultirangeType * | mr1, | ||
const MultirangeType * | mr2 | ||
) |
Definition at line 2424 of file multirangetypes.c.
References multirange_get_bounds(), MultirangeIsEmpty, range_cmp_bounds(), and MultirangeType::rangeCount.
Referenced by multirange_after_multirange(), and multirange_before_multirange().
bool multirange_contains_elem_internal | ( | TypeCacheEntry * | rangetyp, |
const MultirangeType * | mr, | ||
Datum | val | ||
) |
Definition at line 1707 of file multirangetypes.c.
References multirange_bsearch_match(), multirange_elem_bsearch_comparison(), MultirangeIsEmpty, and val.
Referenced by elem_contained_by_multirange(), and multirange_contains_elem().
bool multirange_contains_multirange_internal | ( | TypeCacheEntry * | rangetyp, |
const MultirangeType * | mr1, | ||
const MultirangeType * | mr2 | ||
) |
Definition at line 2266 of file multirangetypes.c.
References multirange_get_bounds(), range_bounds_contains(), range_cmp_bounds(), and MultirangeType::rangeCount.
Referenced by multirange_contained_by_multirange(), and multirange_contains_multirange().
bool multirange_contains_range_internal | ( | TypeCacheEntry * | rangetyp, |
const MultirangeType * | mr, | ||
const RangeType * | r | ||
) |
Definition at line 1801 of file multirangetypes.c.
References Assert, multirange_bsearch_match(), multirange_range_contains_bsearch_comparison(), MultirangeIsEmpty, range_deserialize(), and RangeIsEmpty.
Referenced by multirange_contains_range(), range_contained_by_multirange(), and range_gist_consistent_leaf_multirange().
void multirange_deserialize | ( | TypeCacheEntry * | rangetyp, |
const MultirangeType * | multirange, | ||
int32 * | range_count, | ||
RangeType *** | ranges | ||
) |
Definition at line 826 of file multirangetypes.c.
References i, multirange_get_range(), palloc(), and MultirangeType::rangeCount.
Referenced by multirange_agg_transfn(), multirange_intersect(), multirange_intersect_agg_transfn(), multirange_minus(), multirange_out(), multirange_send(), and multirange_union().
bool multirange_eq_internal | ( | TypeCacheEntry * | rangetyp, |
const MultirangeType * | mr1, | ||
const MultirangeType * | mr2 | ||
) |
Definition at line 1864 of file multirangetypes.c.
References elog, ERROR, i, multirange_get_bounds(), MultirangeTypeGetOid, range_cmp_bounds(), and MultirangeType::rangeCount.
Referenced by multirange_eq(), and multirange_ne_internal().
void multirange_get_bounds | ( | TypeCacheEntry * | rangetyp, |
const MultirangeType * | multirange, | ||
uint32 | i, | ||
RangeBound * | lower, | ||
RangeBound * | upper | ||
) |
Definition at line 744 of file multirangetypes.c.
References Assert, att_addlength_pointer, att_align_pointer, fetch_att(), i, lower(), multirange_get_bounds_offset(), MultirangeGetBoundariesPtr, MultirangeGetFlagsPtr, RANGE_EMPTY, RANGE_HAS_LBOUND, RANGE_HAS_UBOUND, RANGE_LB_INC, RANGE_LB_INF, RANGE_UB_INC, RANGE_UB_INF, TypeCacheEntry::rngelemtype, typalign, TypeCacheEntry::typalign, TypeCacheEntry::typbyval, TypeCacheEntry::typlen, and upper().
Referenced by calc_hist_selectivity(), compute_range_stats(), hash_multirange(), hash_multirange_extended(), multirange_adjacent_multirange(), multirange_before_multirange_internal(), multirange_bsearch_match(), multirange_cmp(), multirange_contains_multirange_internal(), multirange_eq_internal(), multirange_get_union_range(), multirange_lower(), multirange_lower_inc(), multirange_lower_inf(), multirange_overlaps_multirange_internal(), multirange_overleft_multirange(), multirange_overleft_range(), multirange_overright_multirange(), multirange_overright_range(), multirange_union_range_equal(), multirange_upper(), multirange_upper_inc(), multirange_upper_inf(), range_adjacent_multirange_internal(), range_after_multirange_internal(), range_before_multirange_internal(), range_contains_multirange_internal(), range_merge_from_multirange(), range_overleft_multirange_internal(), and range_overright_multirange_internal().
RangeType * multirange_get_range | ( | TypeCacheEntry * | rangetyp, |
const MultirangeType * | multirange, | ||
int | i | ||
) |
Definition at line 695 of file multirangetypes.c.
References Assert, att_addlength_pointer, att_align_pointer, i, len, multirange_get_bounds_offset(), MultirangeGetBoundariesPtr, MultirangeGetFlagsPtr, palloc0(), range(), RANGE_HAS_LBOUND, RANGE_HAS_UBOUND, TypeCacheEntry::rngelemtype, SET_VARSIZE, typalign, TypeCacheEntry::typalign, TypeCacheEntry::type_id, and TypeCacheEntry::typlen.
Referenced by multirange_deserialize(), multirange_unnest(), and range_merge_from_multirange().
TypeCacheEntry * multirange_get_typcache | ( | FunctionCallInfo | fcinfo, |
Oid | mltrngtypid | ||
) |
Definition at line 548 of file multirangetypes.c.
References elog, ERROR, FunctionCallInfoBaseData::flinfo, FmgrInfo::fn_extra, if(), lookup_type_cache(), TypeCacheEntry::rngtype, TypeCacheEntry::type_id, and TYPECACHE_MULTIRANGE_INFO.
Referenced by elem_contained_by_multirange(), hash_multirange(), hash_multirange_extended(), multirange_adjacent_multirange(), multirange_adjacent_range(), multirange_after_multirange(), multirange_after_range(), multirange_agg_transfn(), multirange_before_multirange(), multirange_before_range(), multirange_cmp(), multirange_constructor0(), multirange_constructor1(), multirange_constructor2(), multirange_contained_by_multirange(), multirange_contained_by_range(), multirange_contains_elem(), multirange_contains_multirange(), multirange_contains_range(), multirange_eq(), multirange_gist_compress(), multirange_intersect(), multirange_intersect_agg_transfn(), multirange_lower(), multirange_lower_inc(), multirange_lower_inf(), multirange_minus(), multirange_ne(), multirange_overlaps_multirange(), multirange_overlaps_range(), multirange_overleft_multirange(), multirange_overleft_range(), multirange_overright_multirange(), multirange_overright_range(), multirange_typanalyze(), multirange_union(), multirange_upper(), multirange_upper_inc(), multirange_upper_inf(), multirangesel(), range_adjacent_multirange(), range_after_multirange(), range_agg_finalfn(), range_before_multirange(), range_contained_by_multirange(), range_contains_multirange(), range_merge_from_multirange(), range_overlaps_multirange(), range_overleft_multirange(), and range_overright_multirange().
RangeType * multirange_get_union_range | ( | TypeCacheEntry * | rangetyp, |
const MultirangeType * | mr | ||
) |
Definition at line 802 of file multirangetypes.c.
References lower(), make_empty_range(), make_range(), multirange_get_bounds(), MultirangeIsEmpty, MultirangeType::rangeCount, and upper().
Referenced by multirange_gist_compress().
MultirangeType * multirange_intersect_internal | ( | Oid | mltrngtypoid, |
TypeCacheEntry * | rangetyp, | ||
int32 | range_count1, | ||
RangeType ** | ranges1, | ||
int32 | range_count2, | ||
RangeType ** | ranges2 | ||
) |
Definition at line 1260 of file multirangetypes.c.
References make_multirange(), palloc0(), range_before_internal(), range_intersect_internal(), range_overlaps_internal(), and range_overleft_internal().
Referenced by multirange_intersect(), and multirange_intersect_agg_transfn().
MultirangeType * multirange_minus_internal | ( | Oid | mltrngtypoid, |
TypeCacheEntry * | rangetyp, | ||
int32 | range_count1, | ||
RangeType ** | ranges1, | ||
int32 | range_count2, | ||
RangeType ** | ranges2 | ||
) |
Definition at line 1144 of file multirangetypes.c.
References make_multirange(), palloc0(), range_before_internal(), range_minus_internal(), range_overlaps_internal(), range_split_internal(), and RangeIsEmpty.
Referenced by multirange_minus().
bool multirange_ne_internal | ( | TypeCacheEntry * | rangetyp, |
const MultirangeType * | mr1, | ||
const MultirangeType * | mr2 | ||
) |
Definition at line 1914 of file multirangetypes.c.
References multirange_eq_internal().
Referenced by multirange_ne().
bool multirange_overlaps_multirange_internal | ( | TypeCacheEntry * | rangetyp, |
const MultirangeType * | mr1, | ||
const MultirangeType * | mr2 | ||
) |
Definition at line 2015 of file multirangetypes.c.
References multirange_get_bounds(), MultirangeIsEmpty, range_bounds_overlaps(), range_cmp_bounds(), and MultirangeType::rangeCount.
Referenced by multirange_overlaps_multirange().
|
inlinestatic |
bool range_adjacent_multirange_internal | ( | TypeCacheEntry * | rangetyp, |
const RangeType * | r, | ||
const MultirangeType * | mr | ||
) |
Definition at line 2471 of file multirangetypes.c.
References Assert, bounds_adjacent(), multirange_get_bounds(), MultirangeIsEmpty, range_deserialize(), MultirangeType::rangeCount, and RangeIsEmpty.
Referenced by multirange_adjacent_range(), range_adjacent_multirange(), range_gist_consistent_int_multirange(), and range_gist_consistent_leaf_multirange().
bool range_after_multirange_internal | ( | TypeCacheEntry * | rangetyp, |
const RangeType * | r, | ||
const MultirangeType * | mr | ||
) |
Definition at line 2446 of file multirangetypes.c.
References Assert, multirange_get_bounds(), MultirangeIsEmpty, range_cmp_bounds(), range_deserialize(), MultirangeType::rangeCount, and RangeIsEmpty.
Referenced by multirange_before_range(), range_after_multirange(), range_gist_consistent_int_multirange(), and range_gist_consistent_leaf_multirange().
bool range_before_multirange_internal | ( | TypeCacheEntry * | rangetyp, |
const RangeType * | r, | ||
const MultirangeType * | mr | ||
) |
Definition at line 2402 of file multirangetypes.c.
References Assert, multirange_get_bounds(), MultirangeIsEmpty, range_cmp_bounds(), range_deserialize(), and RangeIsEmpty.
Referenced by multirange_after_range(), range_before_multirange(), range_gist_consistent_int_multirange(), and range_gist_consistent_leaf_multirange().
bool range_contains_multirange_internal | ( | TypeCacheEntry * | rangetyp, |
const RangeType * | r, | ||
const MultirangeType * | mr | ||
) |
Definition at line 1829 of file multirangetypes.c.
References Assert, multirange_get_bounds(), MultirangeIsEmpty, range_bounds_contains(), range_deserialize(), MultirangeType::rangeCount, and RangeIsEmpty.
Referenced by multirange_contained_by_range(), range_contains_multirange(), range_gist_consistent_int_multirange(), and range_gist_consistent_leaf_multirange().
bool range_overlaps_multirange_internal | ( | TypeCacheEntry * | rangetyp, |
const RangeType * | r, | ||
const MultirangeType * | mr | ||
) |
Definition at line 1993 of file multirangetypes.c.
References Assert, multirange_bsearch_match(), multirange_range_overlaps_bsearch_comparison(), MultirangeIsEmpty, range_deserialize(), and RangeIsEmpty.
Referenced by multirange_overlaps_range(), range_gist_consistent_int_multirange(), range_gist_consistent_leaf_multirange(), and range_overlaps_multirange().
bool range_overleft_multirange_internal | ( | TypeCacheEntry * | rangetyp, |
const RangeType * | r, | ||
const MultirangeType * | mr | ||
) |
Definition at line 2073 of file multirangetypes.c.
References Assert, multirange_get_bounds(), MultirangeIsEmpty, PG_RETURN_BOOL, range_cmp_bounds(), range_deserialize(), MultirangeType::rangeCount, and RangeIsEmpty.
Referenced by range_gist_consistent_int_multirange(), range_gist_consistent_leaf_multirange(), and range_overleft_multirange().
bool range_overright_multirange_internal | ( | TypeCacheEntry * | rangetyp, |
const RangeType * | r, | ||
const MultirangeType * | mr | ||
) |
Definition at line 2158 of file multirangetypes.c.
References Assert, multirange_get_bounds(), MultirangeIsEmpty, PG_RETURN_BOOL, range_cmp_bounds(), range_deserialize(), and RangeIsEmpty.
Referenced by range_gist_consistent_int_multirange(), range_gist_consistent_leaf_multirange(), and range_overright_multirange().