23#include "utils/fmgrprotos.h"
64 elog(
ERROR,
"allTheSame should not occur for k-d trees");
92 if (
pa->p->x ==
pb->p->x)
94 return (
pa->p->x >
pb->p->x) ? 1 : -1;
103 if (
pa->p->y ==
pb->p->y)
105 return (
pa->p->y >
pb->p->y) ? 1 : -1;
175 elog(
ERROR,
"allTheSame should not occur for k-d trees");
180 which = (1 << 1) | (1 << 2);
198 if ((in->
level % 2) != 0)
232 if ((in->
level % 2) != 0)
248 elog(
ERROR,
"unrecognized strategy number: %d",
316 for (
i = 1;
i <= 2;
i++)
#define Assert(condition)
#define palloc_array(type, count)
static float8 get_float8_infinity(void)
#define PG_GETARG_POINTER(n)
static bool FPlt(double A, double B)
static Point * DatumGetPointP(Datum X)
static Datum PointPGetDatum(const Point *X)
static BOX * DatumGetBoxP(Datum X)
static bool FPgt(double A, double B)
static Datum BoxPGetDatum(const BOX *X)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
#define qsort(a, b, c, d)
static float8 DatumGetFloat8(Datum X)
static Datum Float8GetDatum(float8 X)
Datum spg_kd_inner_consistent(PG_FUNCTION_ARGS)
static int x_cmp(const void *a, const void *b)
Datum spg_kd_config(PG_FUNCTION_ARGS)
Datum spg_kd_choose(PG_FUNCTION_ARGS)
static int y_cmp(const void *a, const void *b)
static int getSide(double coord, bool isX, Point *tst)
Datum spg_kd_picksplit(PG_FUNCTION_ARGS)
BOX * box_copy(BOX *orig)
double * spg_key_orderbys_distances(Datum key, bool isLeaf, ScanKey orderbys, int norderbys)
#define RTLeftStrategyNumber
#define RTRightStrategyNumber
#define RTSameStrategyNumber
#define RTOldBelowStrategyNumber
#define RTBelowStrategyNumber
#define RTOldAboveStrategyNumber
#define RTAboveStrategyNumber
#define RTContainedByStrategyNumber
StrategyNumber sk_strategy
spgChooseResultType resultType
union spgChooseOut::@54 result
struct spgChooseOut::@54::@55 matchNode
MemoryContext traversalMemoryContext