PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/spgist.h"
#include "access/stratnum.h"
#include "catalog/pg_type.h"
#include "utils/datum.h"
#include "utils/fmgrprotos.h"
#include "utils/rangetypes.h"
Go to the source code of this file.
Functions | |
static int16 | getQuadrant (TypeCacheEntry *typcache, const RangeType *centroid, const RangeType *tst) |
static int | bound_cmp (const void *a, const void *b, void *arg) |
static int | adjacent_inner_consistent (TypeCacheEntry *typcache, const RangeBound *arg, const RangeBound *centroid, const RangeBound *prev) |
static int | adjacent_cmp_bounds (TypeCacheEntry *typcache, const RangeBound *arg, const RangeBound *centroid) |
Datum | spg_range_quad_config (PG_FUNCTION_ARGS) |
Datum | spg_range_quad_choose (PG_FUNCTION_ARGS) |
Datum | spg_range_quad_picksplit (PG_FUNCTION_ARGS) |
Datum | spg_range_quad_inner_consistent (PG_FUNCTION_ARGS) |
Datum | spg_range_quad_leaf_consistent (PG_FUNCTION_ARGS) |
|
static |
Definition at line 785 of file rangetypes_spgist.c.
References arg, Assert, bounds_adjacent(), cmp(), RangeBound::lower, and range_cmp_bounds().
Referenced by adjacent_inner_consistent().
|
static |
Definition at line 887 of file rangetypes_spgist.c.
References adjacent_cmp_bounds(), arg, cmp(), and range_cmp_bounds().
Referenced by spg_range_quad_inner_consistent().
|
static |
Definition at line 186 of file rangetypes_spgist.c.
References a, arg, b, and range_cmp_bounds().
Referenced by spg_range_quad_picksplit().
|
static |
Definition at line 95 of file rangetypes_spgist.c.
References lower(), range_cmp_bounds(), range_deserialize(), and upper().
Referenced by spg_range_quad_choose(), spg_range_quad_inner_consistent(), and spg_range_quad_picksplit().
Datum spg_range_quad_choose | ( | PG_FUNCTION_ARGS | ) |
Definition at line 131 of file rangetypes_spgist.c.
References spgChooseIn::allTheSame, Assert, spgChooseIn::datum, DatumGetRangeTypeP(), getQuadrant(), spgChooseIn::hasPrefix, spgChooseOut::matchNode, PG_GETARG_POINTER, PG_RETURN_VOID, spgChooseIn::prefixDatum, range_get_typcache(), RangeIsEmpty, RangeTypeGetOid, RangeTypePGetDatum(), spgChooseOut::result, spgChooseOut::resultType, and spgMatchNode.
Datum spg_range_quad_config | ( | PG_FUNCTION_ARGS | ) |
Definition at line 60 of file rangetypes_spgist.c.
References spgConfigOut::canReturnData, spgConfigOut::labelType, spgConfigOut::longValuesOK, PG_GETARG_POINTER, PG_RETURN_VOID, and spgConfigOut::prefixType.
Datum spg_range_quad_inner_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 300 of file rangetypes_spgist.c.
References adjacent_inner_consistent(), spgInnerConsistentIn::allTheSame, Assert, cmp(), datumCopy(), DatumGetRangeTypeP(), elog, ERROR, getQuadrant(), spgInnerConsistentIn::hasPrefix, i, lower(), MemoryContextSwitchTo(), spgInnerConsistentIn::nkeys, spgInnerConsistentIn::nNodes, spgInnerConsistentOut::nNodes, spgInnerConsistentOut::nodeNumbers, palloc(), PG_GETARG_POINTER, PG_RETURN_VOID, spgInnerConsistentIn::prefixDatum, range(), range_cmp_bounds(), range_deserialize(), range_get_typcache(), RangeIsEmpty, RANGESTRAT_ADJACENT, RANGESTRAT_AFTER, RANGESTRAT_BEFORE, RANGESTRAT_CONTAINED_BY, RANGESTRAT_CONTAINS, RANGESTRAT_CONTAINS_ELEM, RANGESTRAT_EQ, RANGESTRAT_OVERLAPS, RANGESTRAT_OVERLEFT, RANGESTRAT_OVERRIGHT, RangeTypeGetOid, spgInnerConsistentIn::scankeys, ScanKeyData::sk_argument, ScanKeyData::sk_strategy, spgInnerConsistentIn::traversalMemoryContext, spgInnerConsistentIn::traversalValue, spgInnerConsistentOut::traversalValues, and upper().
Datum spg_range_quad_leaf_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 917 of file rangetypes_spgist.c.
References DatumGetRangeTypeP(), elog, ERROR, i, spgLeafConsistentIn::leafDatum, spgLeafConsistentOut::leafValue, spgLeafConsistentIn::nkeys, PG_GETARG_POINTER, PG_RETURN_BOOL, range_adjacent_internal(), range_after_internal(), range_before_internal(), range_contained_by_internal(), range_contains_elem_internal(), range_contains_internal(), range_eq_internal(), range_get_typcache(), range_overlaps_internal(), range_overleft_internal(), range_overright_internal(), RANGESTRAT_ADJACENT, RANGESTRAT_AFTER, RANGESTRAT_BEFORE, RANGESTRAT_CONTAINED_BY, RANGESTRAT_CONTAINS, RANGESTRAT_CONTAINS_ELEM, RANGESTRAT_EQ, RANGESTRAT_OVERLAPS, RANGESTRAT_OVERLEFT, RANGESTRAT_OVERRIGHT, RangeTypeGetOid, spgLeafConsistentOut::recheck, res, spgLeafConsistentIn::scankeys, ScanKeyData::sk_argument, and ScanKeyData::sk_strategy.
Datum spg_range_quad_picksplit | ( | PG_FUNCTION_ARGS | ) |
Definition at line 200 of file rangetypes_spgist.c.
References bound_cmp(), DatumGetRangeTypeP(), spgPickSplitIn::datums, getQuadrant(), spgPickSplitOut::hasPrefix, i, j, spgPickSplitOut::leafTupleDatums, spgPickSplitIn::level, spgPickSplitOut::mapTuplesToNodes, spgPickSplitOut::nNodes, spgPickSplitOut::nodeLabels, spgPickSplitIn::nTuples, palloc(), PG_GETARG_POINTER, PG_RETURN_VOID, PointerGetDatum(), spgPickSplitOut::prefixDatum, qsort_arg(), range(), range_deserialize(), range_get_typcache(), range_serialize(), RangeTypeGetOid, and RangeTypePGetDatum().