|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <limits.h>#include <math.h>#include "_int.h"#include "access/gist.h"#include "access/reloptions.h"#include "access/stratnum.h"
Go to the source code of this file.
Data Structures | |
| struct | SPLITCOST |
Macros | |
| #define | GETENTRY(vec, pos) ((ArrayType *) DatumGetPointer((vec)->vector[(pos)].key)) |
| #define | MAXNUMELTS (Min((MaxAllocSize / sizeof(Datum)),((MaxAllocSize - ARR_OVERHEAD_NONULLS(1)) / sizeof(int)))/2) |
| #define GETENTRY | ( | vec, | |
| pos | |||
| ) | ((ArrayType *) DatumGetPointer((vec)->vector[(pos)].key)) |
Definition at line 14 of file _int_gist.c.
| #define MAXNUMELTS (Min((MaxAllocSize / sizeof(Datum)),((MaxAllocSize - ARR_OVERHEAD_NONULLS(1)) / sizeof(int)))/2) |
Definition at line 24 of file _int_gist.c.
|
static |
Definition at line 429 of file _int_gist.c.
Referenced by g_int_picksplit().
| Datum g_int_compress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 163 of file _int_gist.c.
References ARRISEMPTY, ARRNELEMS, ARRPTR, CHECKARRVALID, DatumGetArrayTypeP, DatumGetArrayTypePCopy, DatumGetPointer(), ereport, errcode(), errmsg(), ERROR, G_INT_GET_NUMRANGES, gistentryinit, i, internal_size(), j, GISTENTRY::key, GISTENTRY::leafkey, len, MAXNUMELTS, GISTENTRY::offset, GISTENTRY::page, palloc(), pfree(), PG_GETARG_POINTER, PG_INT64_MAX, PG_RETURN_POINTER, PointerGetDatum(), PREPAREARR, GISTENTRY::rel, and resize_intArrayType().
| Datum g_int_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 47 of file _int_gist.c.
References BooleanSearchStrategy, CHECKARRVALID, DatumGetPointer(), DirectFunctionCall3, execconsistent(), g_int_same(), GIST_LEAF, inner_int_contains(), inner_int_overlap(), GISTENTRY::key, pfree(), PG_GETARG_ARRAYTYPE_P_COPY, PG_GETARG_POINTER, PG_GETARG_UINT16, PG_RETURN_BOOL, PointerGetDatum(), PREPAREARR, RTContainedByStrategyNumber, RTContainsStrategyNumber, RTOldContainedByStrategyNumber, RTOldContainsStrategyNumber, RTOverlapStrategyNumber, and RTSameStrategyNumber.
| Datum g_int_decompress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 289 of file _int_gist.c.
References ARRISEMPTY, ARRNELEMS, ARRPTR, CHECKARRVALID, DatumGetArrayTypeP, DatumGetPointer(), ereport, errcode(), errmsg(), ERROR, G_INT_GET_NUMRANGES, gistentryinit, i, internal_size(), j, GISTENTRY::key, MAXNUMELTS, new_intArrayType(), GISTENTRY::offset, GISTENTRY::page, palloc(), pfree(), PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), and GISTENTRY::rel.
| Datum g_int_options | ( | PG_FUNCTION_ARGS | ) |
Definition at line 626 of file _int_gist.c.
References add_local_int_reloption(), G_INT_NUMRANGES_DEFAULT, G_INT_NUMRANGES_MAX, init_local_reloptions(), PG_GETARG_POINTER, and PG_RETURN_VOID.
| Datum g_int_penalty | ( | PG_FUNCTION_ARGS | ) |
Definition at line 364 of file _int_gist.c.
References DatumGetPointer(), inner_int_union(), GISTENTRY::key, pfree(), PG_GETARG_POINTER, PG_RETURN_POINTER, and rt__int_size().
| Datum g_int_picksplit | ( | PG_FUNCTION_ARGS | ) |
Definition at line 442 of file _int_gist.c.
References comparecost(), copy_intArrayType(), SPLITCOST::cost, DEBUG3, elog, FirstOffsetNumber, GETENTRY, i, inner_int_inter(), inner_int_union(), j, GistEntryVector::n, OffsetNumberNext, palloc(), pfree(), PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), SPLITCOST::pos, qsort, rt__int_size(), 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_int_same | ( | PG_FUNCTION_ARGS | ) |
Definition at line 386 of file _int_gist.c.
References a, ARRNELEMS, ARRPTR, b, CHECKARRVALID, PG_GETARG_ARRAYTYPE_P, PG_GETARG_POINTER, and PG_RETURN_POINTER.
Referenced by g_int_consistent().
| Datum g_int_union | ( | PG_FUNCTION_ARGS | ) |
Definition at line 123 of file _int_gist.c.
References _int_unique(), ARRNELEMS, ARRPTR, CHECKARRVALID, GETENTRY, i, GistEntryVector::n, new_intArrayType(), PG_GETARG_POINTER, PG_RETURN_POINTER, QSORT, and VARSIZE().
| PG_FUNCTION_INFO_V1 | ( | g_int_compress | ) |
| PG_FUNCTION_INFO_V1 | ( | g_int_consistent | ) |
| PG_FUNCTION_INFO_V1 | ( | g_int_decompress | ) |
| PG_FUNCTION_INFO_V1 | ( | g_int_options | ) |
| PG_FUNCTION_INFO_V1 | ( | g_int_penalty | ) |
| PG_FUNCTION_INFO_V1 | ( | g_int_picksplit | ) |
| PG_FUNCTION_INFO_V1 | ( | g_int_same | ) |
| PG_FUNCTION_INFO_V1 | ( | g_int_union | ) |