PostgreSQL Source Code git master
|
#include "postgres.h"
#include <float.h>
#include <math.h>
#include "access/gist.h"
#include "access/stratnum.h"
#include "fmgr.h"
#include "segdata.h"
Go to the source code of this file.
Data Structures | |
struct | gseg_picksplit_item |
Macros | |
#define | DatumGetSegP(X) ((SEG *) DatumGetPointer(X)) |
#define | PG_GETARG_SEG_P(n) DatumGetSegP(PG_GETARG_DATUM(n)) |
Variables | |
PG_MODULE_MAGIC | |
#define DatumGetSegP | ( | X | ) | ((SEG *) DatumGetPointer(X)) |
#define PG_GETARG_SEG_P | ( | n | ) | DatumGetSegP(PG_GETARG_DATUM(n)) |
Definition at line 526 of file seg.c.
References DirectFunctionCall2, and seg_union().
Referenced by gseg_union().
Datum gseg_compress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 255 of file seg.c.
References PG_GETARG_POINTER, and PG_RETURN_POINTER.
Datum gseg_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 197 of file seg.c.
References GIST_LEAF, gseg_internal_consistent(), gseg_leaf_consistent(), GISTENTRY::key, PG_GETARG_DATUM, PG_GETARG_POINTER, and PG_GETARG_UINT16.
Datum gseg_decompress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 261 of file seg.c.
References PG_GETARG_POINTER, and PG_RETURN_POINTER.
|
static |
Definition at line 477 of file seg.c.
References DatumGetBool(), DirectFunctionCall2, fprintf, sort-test::key, PG_RETURN_BOOL, RTContainedByStrategyNumber, RTContainsStrategyNumber, RTLeftStrategyNumber, RTOldContainedByStrategyNumber, RTOldContainsStrategyNumber, RTOverlapStrategyNumber, RTOverLeftStrategyNumber, RTOverRightStrategyNumber, RTRightStrategyNumber, RTSameStrategyNumber, seg_contains(), seg_left(), seg_over_left(), seg_over_right(), seg_overlap(), and seg_right().
Referenced by gseg_consistent().
|
static |
Definition at line 433 of file seg.c.
References DirectFunctionCall2, fprintf, sort-test::key, PG_RETURN_DATUM, RTContainedByStrategyNumber, RTContainsStrategyNumber, RTLeftStrategyNumber, RTOldContainedByStrategyNumber, RTOldContainsStrategyNumber, RTOverlapStrategyNumber, RTOverLeftStrategyNumber, RTOverRightStrategyNumber, RTRightStrategyNumber, RTSameStrategyNumber, seg_contained(), seg_contains(), seg_left(), seg_over_left(), seg_over_right(), seg_overlap(), seg_right(), and seg_same().
Referenced by gseg_consistent().
Datum gseg_penalty | ( | PG_FUNCTION_ARGS | ) |
Definition at line 271 of file seg.c.
References DatumGetSegP, DirectFunctionCall2, fprintf, GISTENTRY::key, PG_GETARG_POINTER, PG_RETURN_POINTER, rt_seg_size(), and seg_union().
Datum gseg_picksplit | ( | PG_FUNCTION_ARGS | ) |
Definition at line 320 of file seg.c.
References gseg_picksplit_item::center, gseg_picksplit_item::data, data, DatumGetSegP, DirectFunctionCall2, fprintf, gseg_picksplit_item_cmp(), i, gseg_picksplit_item::index, GISTENTRY::key, SEG::lower, GistEntryVector::n, palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), qsort, seg_union(), GIST_SPLITVEC::spl_ldatum, GIST_SPLITVEC::spl_left, GIST_SPLITVEC::spl_nleft, GIST_SPLITVEC::spl_nright, GIST_SPLITVEC::spl_rdatum, GIST_SPLITVEC::spl_right, SEG::upper, and GistEntryVector::vector.
|
static |
Definition at line 299 of file seg.c.
References a, b, and gseg_picksplit_item::center.
Referenced by gseg_picksplit().
Datum gseg_same | ( | PG_FUNCTION_ARGS | ) |
Definition at line 413 of file seg.c.
References DirectFunctionCall2, fprintf, PG_GETARG_DATUM, PG_GETARG_POINTER, PG_RETURN_POINTER, and seg_same().
Datum gseg_union | ( | PG_FUNCTION_ARGS | ) |
Definition at line 224 of file seg.c.
References fprintf, gseg_binary_union(), i, GISTENTRY::key, GistEntryVector::n, PG_GETARG_POINTER, PG_RETURN_DATUM, and GistEntryVector::vector.
PG_FUNCTION_INFO_V1 | ( | gseg_compress | ) |
PG_FUNCTION_INFO_V1 | ( | gseg_consistent | ) |
PG_FUNCTION_INFO_V1 | ( | gseg_decompress | ) |
PG_FUNCTION_INFO_V1 | ( | gseg_penalty | ) |
PG_FUNCTION_INFO_V1 | ( | gseg_picksplit | ) |
PG_FUNCTION_INFO_V1 | ( | gseg_same | ) |
PG_FUNCTION_INFO_V1 | ( | gseg_union | ) |
PG_FUNCTION_INFO_V1 | ( | seg_center | ) |
PG_FUNCTION_INFO_V1 | ( | seg_cmp | ) |
PG_FUNCTION_INFO_V1 | ( | seg_contained | ) |
PG_FUNCTION_INFO_V1 | ( | seg_contains | ) |
PG_FUNCTION_INFO_V1 | ( | seg_different | ) |
PG_FUNCTION_INFO_V1 | ( | seg_ge | ) |
PG_FUNCTION_INFO_V1 | ( | seg_gt | ) |
PG_FUNCTION_INFO_V1 | ( | seg_in | ) |
PG_FUNCTION_INFO_V1 | ( | seg_inter | ) |
PG_FUNCTION_INFO_V1 | ( | seg_le | ) |
PG_FUNCTION_INFO_V1 | ( | seg_left | ) |
PG_FUNCTION_INFO_V1 | ( | seg_lower | ) |
PG_FUNCTION_INFO_V1 | ( | seg_lt | ) |
PG_FUNCTION_INFO_V1 | ( | seg_out | ) |
PG_FUNCTION_INFO_V1 | ( | seg_over_left | ) |
PG_FUNCTION_INFO_V1 | ( | seg_over_right | ) |
PG_FUNCTION_INFO_V1 | ( | seg_overlap | ) |
PG_FUNCTION_INFO_V1 | ( | seg_right | ) |
PG_FUNCTION_INFO_V1 | ( | seg_same | ) |
PG_FUNCTION_INFO_V1 | ( | seg_size | ) |
PG_FUNCTION_INFO_V1 | ( | seg_union | ) |
PG_FUNCTION_INFO_V1 | ( | seg_upper | ) |
|
static |
Definition at line 915 of file seg.c.
References buf, i, Min, sign, sprintf, and val.
Referenced by seg_out().
|
static |
Datum seg_center | ( | PG_FUNCTION_ARGS | ) |
Definition at line 162 of file seg.c.
References SEG::lower, PG_GETARG_SEG_P, PG_RETURN_FLOAT4, and SEG::upper.
Datum seg_cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 727 of file seg.c.
References a, b, elog, ERROR, PG_GETARG_SEG_P, and PG_RETURN_INT32.
Referenced by seg_different(), seg_ge(), seg_gt(), seg_le(), seg_lt(), and seg_same().
Datum seg_contained | ( | PG_FUNCTION_ARGS | ) |
Definition at line 547 of file seg.c.
References a, b, DirectFunctionCall2, PG_GETARG_DATUM, PG_RETURN_DATUM, and seg_contains().
Referenced by gseg_leaf_consistent().
Datum seg_contains | ( | PG_FUNCTION_ARGS | ) |
Definition at line 538 of file seg.c.
References a, b, PG_GETARG_SEG_P, and PG_RETURN_BOOL.
Referenced by gseg_internal_consistent(), gseg_leaf_consistent(), and seg_contained().
Datum seg_different | ( | PG_FUNCTION_ARGS | ) |
Definition at line 890 of file seg.c.
References cmp(), DatumGetInt32(), DirectFunctionCall2, PG_GETARG_DATUM, PG_RETURN_BOOL, and seg_cmp().
Datum seg_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 879 of file seg.c.
References cmp(), DatumGetInt32(), DirectFunctionCall2, PG_GETARG_DATUM, PG_RETURN_BOOL, and seg_cmp().
Datum seg_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 869 of file seg.c.
References cmp(), DatumGetInt32(), DirectFunctionCall2, PG_GETARG_DATUM, PG_RETURN_BOOL, and seg_cmp().
Datum seg_in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 104 of file seg.c.
References palloc(), PG_GETARG_CSTRING, PG_RETURN_POINTER, seg_scanner_finish(), seg_scanner_init(), seg_yyerror(), seg_yyparse(), and str.
Datum seg_inter | ( | PG_FUNCTION_ARGS | ) |
Definition at line 666 of file seg.c.
References a, b, SEG::l_ext, SEG::l_sigd, SEG::lower, palloc(), PG_GETARG_SEG_P, PG_RETURN_POINTER, SEG::u_ext, SEG::u_sigd, and SEG::upper.
Datum seg_le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 859 of file seg.c.
References cmp(), DatumGetInt32(), DirectFunctionCall2, PG_GETARG_DATUM, PG_RETURN_BOOL, and seg_cmp().
Datum seg_left | ( | PG_FUNCTION_ARGS | ) |
Definition at line 595 of file seg.c.
References a, b, PG_GETARG_SEG_P, and PG_RETURN_BOOL.
Referenced by gseg_internal_consistent(), and gseg_leaf_consistent().
Datum seg_lower | ( | PG_FUNCTION_ARGS | ) |
Definition at line 170 of file seg.c.
References SEG::lower, PG_GETARG_SEG_P, and PG_RETURN_FLOAT4.
Datum seg_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 849 of file seg.c.
References cmp(), DatumGetInt32(), DirectFunctionCall2, PG_GETARG_DATUM, PG_RETURN_BOOL, and seg_cmp().
Datum seg_out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 121 of file seg.c.
References SEG::l_ext, SEG::l_sigd, SEG::lower, palloc(), PG_GETARG_SEG_P, PG_RETURN_CSTRING, restore(), sprintf, SEG::u_ext, SEG::u_sigd, and SEG::upper.
Datum seg_over_left | ( | PG_FUNCTION_ARGS | ) |
Definition at line 584 of file seg.c.
References a, b, PG_GETARG_SEG_P, and PG_RETURN_BOOL.
Referenced by gseg_internal_consistent(), and gseg_leaf_consistent().
Datum seg_over_right | ( | PG_FUNCTION_ARGS | ) |
Definition at line 617 of file seg.c.
References a, b, PG_GETARG_SEG_P, and PG_RETURN_BOOL.
Referenced by gseg_internal_consistent(), and gseg_leaf_consistent().
Datum seg_overlap | ( | PG_FUNCTION_ARGS | ) |
Definition at line 572 of file seg.c.
References a, b, PG_GETARG_SEG_P, and PG_RETURN_BOOL.
Referenced by gseg_internal_consistent(), and gseg_leaf_consistent().
Datum seg_right | ( | PG_FUNCTION_ARGS | ) |
Definition at line 606 of file seg.c.
References a, b, PG_GETARG_SEG_P, and PG_RETURN_BOOL.
Referenced by gseg_internal_consistent(), and gseg_leaf_consistent().
Datum seg_same | ( | PG_FUNCTION_ARGS | ) |
Definition at line 560 of file seg.c.
References cmp(), DatumGetInt32(), DirectFunctionCall2, PG_GETARG_DATUM, PG_RETURN_BOOL, and seg_cmp().
Referenced by gseg_leaf_consistent(), and gseg_same().
Datum seg_size | ( | PG_FUNCTION_ARGS | ) |
Definition at line 715 of file seg.c.
References SEG::lower, PG_GETARG_SEG_P, PG_RETURN_FLOAT4, and SEG::upper.
Datum seg_union | ( | PG_FUNCTION_ARGS | ) |
Definition at line 626 of file seg.c.
References a, b, SEG::l_ext, SEG::l_sigd, SEG::lower, palloc(), PG_GETARG_SEG_P, PG_RETURN_POINTER, SEG::u_ext, SEG::u_sigd, and SEG::upper.
Referenced by gseg_binary_union(), gseg_penalty(), and gseg_picksplit().
Datum seg_upper | ( | PG_FUNCTION_ARGS | ) |
Definition at line 178 of file seg.c.
References PG_GETARG_SEG_P, PG_RETURN_FLOAT4, and SEG::upper.
int significant_digits | ( | const char * | s | ) |
Definition at line 1065 of file seg.c.