PostgreSQL Source Code git master
|
#include "postgres.h"
#include "access/spgist.h"
#include "access/spgist_private.h"
#include "access/stratnum.h"
#include "catalog/pg_type.h"
#include "utils/float.h"
#include "utils/fmgrprotos.h"
#include "utils/geo_decls.h"
Go to the source code of this file.
Data Structures | |
struct | SortedPoint |
Typedefs | |
typedef struct SortedPoint | SortedPoint |
Functions | |
Datum | spg_kd_config (PG_FUNCTION_ARGS) |
static int | getSide (double coord, bool isX, Point *tst) |
Datum | spg_kd_choose (PG_FUNCTION_ARGS) |
static int | x_cmp (const void *a, const void *b) |
static int | y_cmp (const void *a, const void *b) |
Datum | spg_kd_picksplit (PG_FUNCTION_ARGS) |
Datum | spg_kd_inner_consistent (PG_FUNCTION_ARGS) |
typedef struct SortedPoint SortedPoint |
|
static |
Definition at line 41 of file spgkdtreeproc.c.
References if(), Point::x, and Point::y.
Referenced by spg_kd_choose().
Datum spg_kd_choose | ( | PG_FUNCTION_ARGS | ) |
Definition at line 54 of file spgkdtreeproc.c.
References spgChooseIn::allTheSame, Assert, spgChooseIn::datum, DatumGetFloat8(), DatumGetPointP(), elog, ERROR, getSide(), spgChooseIn::hasPrefix, spgChooseIn::level, spgChooseOut::levelAdd, spgChooseOut::matchNode, spgChooseIn::nNodes, spgChooseOut::nodeN, PG_GETARG_POINTER, PG_RETURN_VOID, PointPGetDatum(), spgChooseIn::prefixDatum, spgChooseOut::restDatum, spgChooseOut::result, spgChooseOut::resultType, and spgMatchNode.
Datum spg_kd_config | ( | PG_FUNCTION_ARGS | ) |
Definition at line 28 of file spgkdtreeproc.c.
References spgConfigOut::canReturnData, spgConfigOut::labelType, spgConfigOut::longValuesOK, PG_GETARG_POINTER, PG_RETURN_VOID, and spgConfigOut::prefixType.
Datum spg_kd_inner_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 160 of file spgkdtreeproc.c.
References spgInnerConsistentIn::allTheSame, Assert, box_copy(), BoxPGetDatum(), DatumGetBoxP(), DatumGetFloat8(), DatumGetPointP(), spgInnerConsistentOut::distances, elog, ERROR, FPgt(), FPlt(), get_float8_infinity(), spgInnerConsistentIn::hasPrefix, BOX::high, i, spgInnerConsistentIn::level, spgInnerConsistentOut::levelAdds, BOX::low, MemoryContextSwitchTo(), spgInnerConsistentIn::nkeys, spgInnerConsistentIn::nNodes, spgInnerConsistentOut::nNodes, spgInnerConsistentOut::nodeNumbers, spgInnerConsistentIn::norderbys, spgInnerConsistentIn::orderbys, palloc(), PG_GETARG_POINTER, PG_RETURN_VOID, spgInnerConsistentIn::prefixDatum, RTAboveStrategyNumber, RTBelowStrategyNumber, RTContainedByStrategyNumber, RTLeftStrategyNumber, RTOldAboveStrategyNumber, RTOldBelowStrategyNumber, RTRightStrategyNumber, RTSameStrategyNumber, spgInnerConsistentIn::scankeys, ScanKeyData::sk_argument, ScanKeyData::sk_strategy, spg_key_orderbys_distances(), spgInnerConsistentIn::traversalMemoryContext, spgInnerConsistentIn::traversalValue, spgInnerConsistentOut::traversalValues, Point::x, and Point::y.
Datum spg_kd_picksplit | ( | PG_FUNCTION_ARGS | ) |
Definition at line 108 of file spgkdtreeproc.c.
References DatumGetPointP(), spgPickSplitIn::datums, Float8GetDatum(), spgPickSplitOut::hasPrefix, i, SortedPoint::i, spgPickSplitOut::leafTupleDatums, spgPickSplitIn::level, spgPickSplitOut::mapTuplesToNodes, spgPickSplitOut::nNodes, spgPickSplitOut::nodeLabels, spgPickSplitIn::nTuples, SortedPoint::p, palloc(), PG_GETARG_POINTER, PG_RETURN_VOID, PointPGetDatum(), spgPickSplitOut::prefixDatum, qsort, x_cmp(), Point::y, and y_cmp().
|
static |
Definition at line 85 of file spgkdtreeproc.c.
References a, b, SortedPoint::p, and Point::x.
Referenced by spg_kd_picksplit(), and spg_quad_picksplit().
|
static |
Definition at line 96 of file spgkdtreeproc.c.
References a, b, SortedPoint::p, and Point::y.
Referenced by spg_kd_picksplit(), and spg_quad_picksplit().