PostgreSQL Source Code git master
|
#include "postgres.h"
#include <math.h>
#include "_int.h"
#include "access/gist.h"
#include "access/reloptions.h"
#include "access/stratnum.h"
#include "common/int.h"
#include "port/pg_bitutils.h"
Go to the source code of this file.
Data Structures | |
struct | SPLITCOST |
Macros | |
#define | GETENTRY(vec, pos) ((GISTTYPE *) DatumGetPointer((vec)->vector[(pos)].key)) |
#define GETENTRY | ( | vec, | |
pos | |||
) | ((GISTTYPE *) DatumGetPointer((vec)->vector[(pos)].key)) |
Definition at line 15 of file _intbig_gist.c.
Definition at line 52 of file _intbig_gist.c.
References ALLISTRUE, CALCGTSIZE, flag(), GETSIGN, palloc(), res, SET_VARSIZE, sign, and size.
Referenced by g_intbig_compress(), g_intbig_picksplit(), and g_intbig_union().
Definition at line 95 of file _intbig_gist.c.
References a, ARRNELEMS, ARRPTR, b, CHECKARRVALID, GETBIT, GETSIGN, and HASHVAL.
Referenced by g_intbig_consistent().
Datum _intbig_in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 32 of file _intbig_gist.c.
References ereport, errcode(), errmsg(), ERROR, and PG_RETURN_VOID.
Datum _intbig_out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 42 of file _intbig_gist.c.
References ereport, errcode(), errmsg(), ERROR, and PG_RETURN_VOID.
Definition at line 77 of file _intbig_gist.c.
References a, ARRNELEMS, ARRPTR, b, CHECKARRVALID, GETBIT, GETSIGN, and HASHVAL.
Referenced by g_intbig_consistent().
|
static |
Definition at line 314 of file _intbig_gist.c.
References a, b, and pg_cmp_s32().
Referenced by g_intbig_picksplit().
Datum g_intbig_compress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 146 of file _intbig_gist.c.
References _intbig_alloc(), ARRISEMPTY, ARRNELEMS, ARRPTR, CHECKARRVALID, DatumGetArrayTypeP, DatumGetPointer(), GET_SIGLEN, GETSIGN, gistentryinit, HASH, i, ISALLTRUE, GISTENTRY::key, GISTENTRY::leafkey, LOOPBYTE, GISTENTRY::offset, GISTENTRY::page, palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), GISTENTRY::rel, res, and sign.
Datum g_intbig_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 465 of file _intbig_gist.c.
References _intbig_contains(), _intbig_overlap(), ARRNELEMS, ARRPTR, BooleanSearchStrategy, CHECKARRVALID, DatumGetPointer(), GET_SIGLEN, GETSIGN, GIST_LEAF, HASH, i, ISALLTRUE, GISTENTRY::key, LOOPBYTE, palloc0(), pfree(), PG_FREE_IF_COPY, PG_GETARG_ARRAYTYPE_P, PG_GETARG_POINTER, PG_GETARG_UINT16, PG_RETURN_BOOL, RTContainedByStrategyNumber, RTContainsStrategyNumber, RTOldContainedByStrategyNumber, RTOldContainsStrategyNumber, RTOverlapStrategyNumber, RTSameStrategyNumber, and signconsistent().
Datum g_intbig_decompress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 249 of file _intbig_gist.c.
References PG_GETARG_DATUM, and PG_RETURN_DATUM.
Datum g_intbig_options | ( | PG_FUNCTION_ARGS | ) |
Definition at line 587 of file _intbig_gist.c.
References add_local_int_reloption(), init_local_reloptions(), PG_GETARG_POINTER, PG_RETURN_VOID, SIGLEN_DEFAULT, and SIGLEN_MAX.
Datum g_intbig_penalty | ( | PG_FUNCTION_ARGS | ) |
Definition at line 293 of file _intbig_gist.c.
References DatumGetPointer(), GET_SIGLEN, hemdist(), GISTENTRY::key, newval, PG_GETARG_POINTER, and PG_RETURN_POINTER.
Datum g_intbig_picksplit | ( | PG_FUNCTION_ARGS | ) |
Definition at line 322 of file _intbig_gist.c.
References _intbig_alloc(), comparecost(), SPLITCOST::cost, FirstOffsetNumber, GET_SIGLEN, GETENTRY, GETSIGN, hemdist(), i, ISALLTRUE, j, LOOPBYTE, GistEntryVector::n, OffsetNumberNext, palloc(), pfree(), PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), SPLITCOST::pos, qsort, 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 WISH_F.
Datum g_intbig_same | ( | PG_FUNCTION_ARGS | ) |
Definition at line 113 of file _intbig_gist.c.
References a, b, GET_SIGLEN, GETSIGN, i, ISALLTRUE, LOOPBYTE, PG_GETARG_POINTER, and PG_RETURN_POINTER.
Datum g_intbig_union | ( | PG_FUNCTION_ARGS | ) |
Definition at line 268 of file _intbig_gist.c.
References _intbig_alloc(), ALLISTRUE, CALCGTSIZE, GISTTYPE::flag, GET_SIGLEN, GETENTRY, GETSIGN, i, GistEntryVector::n, PG_GETARG_POINTER, PG_RETURN_POINTER, SET_VARSIZE, size, unionkey(), and VARSIZE.
Definition at line 233 of file _intbig_gist.c.
References a, b, GETSIGN, hemdistsign(), ISALLTRUE, SIGLENBIT, and sizebitvec().
Referenced by g_intbig_penalty(), and g_intbig_picksplit().
Definition at line 217 of file _intbig_gist.c.
References a, b, i, LOOPBYTE, and pg_number_of_ones.
Referenced by hemdist().
PG_FUNCTION_INFO_V1 | ( | _intbig_in | ) |
PG_FUNCTION_INFO_V1 | ( | _intbig_out | ) |
PG_FUNCTION_INFO_V1 | ( | g_intbig_compress | ) |
PG_FUNCTION_INFO_V1 | ( | g_intbig_consistent | ) |
PG_FUNCTION_INFO_V1 | ( | g_intbig_decompress | ) |
PG_FUNCTION_INFO_V1 | ( | g_intbig_options | ) |
PG_FUNCTION_INFO_V1 | ( | g_intbig_penalty | ) |
PG_FUNCTION_INFO_V1 | ( | g_intbig_picksplit | ) |
PG_FUNCTION_INFO_V1 | ( | g_intbig_same | ) |
PG_FUNCTION_INFO_V1 | ( | g_intbig_union | ) |
Definition at line 211 of file _intbig_gist.c.
References pg_popcount(), and sign.
Referenced by hemdist().