#include "postgres.h"
#include <math.h>
#include "access/gist.h"
#include "access/stratnum.h"
#include "utils/float.h"
#include "utils/fmgrprotos.h"
#include "utils/geo_decls.h"
#include "utils/sortsupport.h"
Go to the source code of this file.
Definition at line 1332 of file gistproc.c.
Definition at line 1334 of file gistproc.c.
Definition at line 1330 of file gistproc.c.
Definition at line 44 of file gistproc.c.
Definition at line 1216 of file gistproc.c.
Definition at line 1331 of file gistproc.c.
Definition at line 1333 of file gistproc.c.
Definition at line 146 of file gistproc.c.
References b, float8_gt(), float8_lt(), BOX::high, BOX::low, Point::x, and Point::y.
Referenced by fallbackSplit(), gist_box_picksplit(), and gist_box_union().
Definition at line 97 of file gistproc.c.
References float8_mi(), rt_box_union(), and size_box().
Referenced by gist_box_penalty(), and gist_box_picksplit().
Definition at line 460 of file gistproc.c.
References float8_cmp_internal().
Referenced by gist_box_picksplit().
Definition at line 1221 of file gistproc.c.
References Assert(), elog, ERROR, float8_mi(), BOX::high, BOX::low, point_point_distance, Point::x, and Point::y.
Referenced by gist_bbox_distance(), and gist_point_distance().
Definition at line 216 of file gistproc.c.
References adjustBox(), BoxPGetDatum(), cur, DatumGetBoxP(), FirstOffsetNumber, i, GISTENTRY::key, GistEntryVector::n, OffsetNumberNext, palloc(), GIST_SPLITVEC::spl_ldatum, GIST_SPLITVEC::spl_left, GIST_SPLITVEC::spl_nleft, GIST_SPLITVEC::spl_nright, GIST_SPLITVEC::spl_rdatum, GIST_SPLITVEC::spl_right, and GistEntryVector::vector.
Referenced by gist_box_picksplit().
Definition at line 351 of file gistproc.c.
References ConsiderSplitContext::boundingBox, ConsiderSplitContext::dim, ConsiderSplitContext::entriesCount, ConsiderSplitContext::first, float4_div(), float8_div(), float8_mi(), BOX::high, ConsiderSplitContext::leftUpper, LIMIT_RATIO, BOX::low, Min, non_negative(), ConsiderSplitContext::overlap, ConsiderSplitContext::range, range(), ConsiderSplitContext::ratio, ConsiderSplitContext::rightLower, Point::x, and Point::y.
Referenced by gist_box_picksplit().
Definition at line 1479 of file gistproc.c.
References computeDistance(), DatumGetBoxP(), DatumGetPointP(), elog, ERROR, GeoStrategyNumberOffset, GISTENTRY::key, and PointStrategyNumberGroup.
Referenced by gist_box_distance(), gist_circle_distance(), and gist_poly_distance().
Definition at line 1732 of file gistproc.c.
Referenced by gist_point_sortsupport().
Definition at line 1714 of file gistproc.c.
References DatumGetBoxP(), BOX::low, point_zorder_internal(), UInt64GetDatum(), Point::x, and Point::y.
Referenced by gist_point_sortsupport().
Definition at line 1681 of file gistproc.c.
References a, b, DatumGetBoxP(), BOX::low, point_zorder_internal(), Point::x, and Point::y.
Referenced by gist_point_sortsupport().
Definition at line 113 of file gistproc.c.
References DatumGetBoxP(), gist_box_leaf_consistent(), GIST_LEAF, GISTENTRY::key, PG_GETARG_BOX_P, PG_GETARG_POINTER, PG_GETARG_UINT16, PG_RETURN_BOOL, and rtree_internal_consistent().
Definition at line 1500 of file gistproc.c.
References gist_bbox_distance(), PG_GETARG_DATUM, PG_GETARG_POINTER, PG_GETARG_UINT16, and PG_RETURN_FLOAT8.
Definition at line 872 of file gistproc.c.
References box_above(), box_below(), box_contain(), box_contained(), box_left(), box_overabove(), box_overbelow(), box_overlap(), box_overleft(), box_overright(), box_right(), box_same(), DatumGetBool(), DirectFunctionCall2, elog, ERROR, sort-test::key, PointerGetDatum(), RTAboveStrategyNumber, RTBelowStrategyNumber, RTContainedByStrategyNumber, RTContainsStrategyNumber, RTLeftStrategyNumber, RTOverAboveStrategyNumber, RTOverBelowStrategyNumber, RTOverlapStrategyNumber, RTOverLeftStrategyNumber, RTOverRightStrategyNumber, RTRightStrategyNumber, and RTSameStrategyNumber.
Referenced by gist_box_consistent().
Definition at line 199 of file gistproc.c.
References box_penalty(), DatumGetBoxP(), GISTENTRY::key, PG_GETARG_POINTER, and PG_RETURN_POINTER.
Definition at line 495 of file gistproc.c.
References adjustBox(), Assert(), ConsiderSplitContext::boundingBox, box_penalty(), common_entry_cmp(), DatumGetBoxP(), CommonEntry::delta, ConsiderSplitContext::dim, ConsiderSplitContext::entriesCount, fallbackSplit(), ConsiderSplitContext::first, FirstOffsetNumber, float8_eq(), float8_ge(), float8_gt(), float8_le(), float8_lt(), float8_mi(), g_box_consider_split(), BOX::high, i, CommonEntry::index, interval_cmp_lower(), interval_cmp_upper(), GISTENTRY::key, ConsiderSplitContext::leftUpper, LIMIT_RATIO, BOX::low, SplitInterval::lower, lower(), GistEntryVector::n, OffsetNumberNext, palloc(), palloc0(), PG_GETARG_POINTER, PG_RETURN_POINTER, PLACE_LEFT, PLACE_RIGHT, PointerGetDatum(), qsort, ConsiderSplitContext::rightLower, GIST_SPLITVEC::spl_ldatum, GIST_SPLITVEC::spl_left, GIST_SPLITVEC::spl_nleft, GIST_SPLITVEC::spl_nright, GIST_SPLITVEC::spl_rdatum, GIST_SPLITVEC::spl_right, SplitInterval::upper, upper(), GistEntryVector::vector, Point::x, and Point::y.
Definition at line 852 of file gistproc.c.
References float8_eq(), BOX::high, BOX::low, PG_GETARG_BOX_P, PG_GETARG_POINTER, PG_RETURN_POINTER, Point::x, and Point::y.
Definition at line 164 of file gistproc.c.
References adjustBox(), cur, DatumGetBoxP(), i, GISTENTRY::key, GistEntryVector::n, palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, and GistEntryVector::vector.
Definition at line 1100 of file gistproc.c.
References CIRCLE::center, DatumGetCircleP(), float8_mi(), float8_pl(), gistentryinit, BOX::high, GISTENTRY::key, GISTENTRY::leafkey, BOX::low, GISTENTRY::offset, GISTENTRY::page, palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), CIRCLE::radius, GISTENTRY::rel, Point::x, and Point::y.
Definition at line 1130 of file gistproc.c.
References CIRCLE::center, DatumGetBoxP(), float8_mi(), float8_pl(), BOX::high, GISTENTRY::key, BOX::low, PG_GETARG_CIRCLE_P, PG_GETARG_POINTER, PG_GETARG_UINT16, PG_RETURN_BOOL, CIRCLE::radius, rtree_internal_consistent(), Point::x, and Point::y.
Referenced by gist_point_consistent().
Definition at line 1526 of file gistproc.c.
References gist_bbox_distance(), PG_GETARG_DATUM, PG_GETARG_POINTER, PG_GETARG_UINT16, and PG_RETURN_FLOAT8.
Definition at line 1168 of file gistproc.c.
References BoxPGetDatum(), DatumGetPointP(), gistentryinit, BOX::high, GISTENTRY::key, GISTENTRY::leafkey, BOX::low, GISTENTRY::offset, GISTENTRY::page, palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, and GISTENTRY::rel.
Definition at line 1337 of file gistproc.c.
References Assert(), BoxStrategyNumberGroup, circle_contain_pt(), CirclePGetDatum(), CircleStrategyNumberGroup, DatumGetBool(), DatumGetBoxP(), DirectFunctionCall2, DirectFunctionCall5, elog, ERROR, GeoStrategyNumberOffset, gist_circle_consistent(), GIST_LEAF, gist_point_consistent_internal(), gist_poly_consistent(), BOX::high, Int16GetDatum(), GISTENTRY::key, sort-test::key, BOX::low, PG_GETARG_BOX_P, PG_GETARG_CIRCLE_P, PG_GETARG_POINT_P, PG_GETARG_POINTER, PG_GETARG_POLYGON_P, PG_GETARG_UINT16, PG_RETURN_BOOL, PointerGetDatum(), PointPGetDatum(), PointStrategyNumberGroup, poly_contain_pt(), PolygonPGetDatum(), PolygonStrategyNumberGroup, RTAboveStrategyNumber, RTBelowStrategyNumber, RTOldAboveStrategyNumber, RTOldBelowStrategyNumber, RTOverlapStrategyNumber, Point::x, and Point::y.
Definition at line 1287 of file gistproc.c.
References elog, ERROR, FPeq(), FPge(), FPgt(), FPle(), FPlt(), sort-test::key, RTAboveStrategyNumber, RTBelowStrategyNumber, RTLeftStrategyNumber, RTRightStrategyNumber, RTSameStrategyNumber, Point::x, and Point::y.
Referenced by gist_point_consistent().
Definition at line 1455 of file gistproc.c.
References computeDistance(), DatumGetBoxP(), elog, ERROR, GeoStrategyNumberOffset, GIST_LEAF, GISTENTRY::key, PG_GETARG_POINT_P, PG_GETARG_POINTER, PG_GETARG_UINT16, PG_RETURN_FLOAT8, and PointStrategyNumberGroup.
Definition at line 1196 of file gistproc.c.
References DatumGetBoxP(), gistentryinit, BOX::high, GISTENTRY::key, GISTENTRY::offset, GISTENTRY::page, palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), GISTENTRY::rel, Point::x, and Point::y.
Definition at line 1741 of file gistproc.c.
References SortSupportData::abbrev_abort, SortSupportData::abbrev_converter, SortSupportData::abbrev_full_comparator, SortSupportData::abbreviate, SortSupportData::comparator, gist_bbox_zorder_abbrev_abort(), gist_bbox_zorder_abbrev_convert(), gist_bbox_zorder_cmp(), PG_GETARG_POINTER, PG_RETURN_VOID, and ssup_datum_unsigned_cmp().
Definition at line 1035 of file gistproc.c.
References POLYGON::boundbox, DatumGetPolygonP(), gistentryinit, GISTENTRY::key, GISTENTRY::leafkey, GISTENTRY::offset, GISTENTRY::page, palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), and GISTENTRY::rel.
Definition at line 1062 of file gistproc.c.
References POLYGON::boundbox, DatumGetBoxP(), GISTENTRY::key, PG_FREE_IF_COPY, PG_GETARG_POINTER, PG_GETARG_POLYGON_P, PG_GETARG_UINT16, PG_RETURN_BOOL, and rtree_internal_consistent().
Referenced by gist_point_consistent().
Definition at line 1543 of file gistproc.c.
References gist_bbox_distance(), PG_GETARG_DATUM, PG_GETARG_POINTER, PG_GETARG_UINT16, and PG_RETURN_FLOAT8.
Definition at line 1603 of file gistproc.c.
Referenced by point_zorder_internal().
Definition at line 315 of file gistproc.c.
References float8_cmp_internal().
Referenced by gist_box_picksplit().
Definition at line 327 of file gistproc.c.
References float8_cmp_internal().
Referenced by gist_box_picksplit().
Definition at line 339 of file gistproc.c.
References val.
Referenced by g_box_consider_split().
Definition at line 1586 of file gistproc.c.
References UINT64CONST, and x.
Referenced by point_zorder_internal().
Definition at line 1575 of file gistproc.c.
References ieee_float32_to_uint32(), part_bits32_by2(), x, and y.
Referenced by gist_bbox_zorder_abbrev_convert(), and gist_bbox_zorder_cmp().
Definition at line 55 of file gistproc.c.
References a, b, float8_max(), float8_min(), BOX::high, BOX::low, Point::x, and Point::y.
Referenced by box_penalty().
Definition at line 957 of file gistproc.c.
References box_above(), box_below(), box_contain(), box_left(), box_overabove(), box_overbelow(), box_overlap(), box_overleft(), box_overright(), box_right(), DatumGetBool(), DirectFunctionCall2, elog, ERROR, sort-test::key, PointerGetDatum(), RTAboveStrategyNumber, RTBelowStrategyNumber, RTContainedByStrategyNumber, RTContainsStrategyNumber, RTLeftStrategyNumber, RTOverAboveStrategyNumber, RTOverBelowStrategyNumber, RTOverlapStrategyNumber, RTOverLeftStrategyNumber, RTOverRightStrategyNumber, RTRightStrategyNumber, and RTSameStrategyNumber.
Referenced by gist_box_consistent(), gist_circle_consistent(), and gist_poly_consistent().
Definition at line 68 of file gistproc.c.
References float8_le(), float8_mi(), float8_mul(), get_float8_infinity(), BOX::high, BOX::low, Point::x, and Point::y.
Referenced by box_penalty().