|
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.
Definition at line 430 of file _int_gist.c.
Referenced by g_int_picksplit().
| Datum g_int_compress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 164 of file _int_gist.c.
References ARRISEMPTY, ARRNELEMS, ARRPTR, CHECKARRVALID, DatumGetArrayTypeP, DatumGetArrayTypePCopy, DatumGetPointer(), ereport, errcode(), errmsg(), ERROR, fb(), G_INT_GET_NUMRANGES, gistentryinit, i, internal_size(), j, GISTENTRY::key, GISTENTRY::leafkey, len, MAXNUMELTS, GISTENTRY::offset, GISTENTRY::page, palloc_object, 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_OID, 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 290 of file _int_gist.c.
References ARRISEMPTY, ARRNELEMS, ARRPTR, CHECKARRVALID, DatumGetArrayTypeP, DatumGetPointer(), ereport, errcode(), errmsg(), ERROR, fb(), G_INT_GET_NUMRANGES, gistentryinit, i, internal_size(), j, GISTENTRY::key, MAXNUMELTS, new_intArrayType(), GISTENTRY::offset, GISTENTRY::page, palloc_object, pfree(), PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), and GISTENTRY::rel.
| Datum g_int_options | ( | PG_FUNCTION_ARGS | ) |
Definition at line 627 of file _int_gist.c.
References add_local_int_reloption(), fb(), 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 365 of file _int_gist.c.
References DatumGetPointer(), fb(), inner_int_union(), pfree(), PG_GETARG_POINTER, PG_RETURN_POINTER, and rt__int_size().
| Datum g_int_picksplit | ( | PG_FUNCTION_ARGS | ) |
Definition at line 443 of file _int_gist.c.
References comparecost(), copy_intArrayType(), DEBUG3, elog, fb(), FirstOffsetNumber, GETENTRY, i, inner_int_inter(), inner_int_union(), j, OffsetNumberNext, palloc(), palloc_array, pfree(), PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), 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 387 of file _int_gist.c.
References a, ARRNELEMS, ARRPTR, b, CHECKARRVALID, fb(), 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 124 of file _int_gist.c.
References _int_unique(), ARRNELEMS, ARRPTR, CHECKARRVALID, fb(), GETENTRY, i, 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 | ) |