PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/gist.h"
#include "access/stratnum.h"
#include "tsearch/ts_utils.h"
#include "utils/builtins.h"
Go to the source code of this file.
Data Structures | |
struct | SPLITCOST |
Macros | |
#define | GETENTRY(vec, pos) DatumGetTSQuerySign((vec)->vector[pos].key) |
#define | WISH_F(a, b, c) (double)( -(double)(((a)-(b))*((a)-(b))*((a)-(b)))*(c) ) |
Functions | |
Datum | gtsquery_compress (PG_FUNCTION_ARGS) |
Datum | gtsquery_consistent (PG_FUNCTION_ARGS) |
Datum | gtsquery_union (PG_FUNCTION_ARGS) |
Datum | gtsquery_same (PG_FUNCTION_ARGS) |
static int | sizebitvec (TSQuerySign sign) |
static int | hemdist (TSQuerySign a, TSQuerySign b) |
Datum | gtsquery_penalty (PG_FUNCTION_ARGS) |
static int | comparecost (const void *a, const void *b) |
Datum | gtsquery_picksplit (PG_FUNCTION_ARGS) |
Datum | gtsquery_consistent_oldsig (PG_FUNCTION_ARGS) |
#define GETENTRY | ( | vec, | |
pos | |||
) | DatumGetTSQuerySign((vec)->vector[pos].key) |
Definition at line 22 of file tsquery_gist.c.
Definition at line 165 of file tsquery_gist.c.
|
static |
Definition at line 157 of file tsquery_gist.c.
Referenced by gtsquery_picksplit().
Datum gtsquery_compress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 26 of file tsquery_gist.c.
References DatumGetTSQuery(), gistentryinit, GISTENTRY::key, GISTENTRY::leafkey, makeTSQuerySign(), GISTENTRY::offset, GISTENTRY::page, palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, GISTENTRY::rel, sign, and TSQuerySignGetDatum().
Datum gtsquery_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 52 of file tsquery_gist.c.
References DatumGetTSQuerySign(), GIST_LEAF, GISTENTRY::key, sort-test::key, makeTSQuerySign(), PG_GETARG_POINTER, PG_GETARG_TSQUERY, PG_GETARG_UINT16, PG_RETURN_BOOL, RTContainedByStrategyNumber, and RTContainsStrategyNumber.
Referenced by gtsquery_consistent_oldsig().
Datum gtsquery_consistent_oldsig | ( | PG_FUNCTION_ARGS | ) |
Datum gtsquery_penalty | ( | PG_FUNCTION_ARGS | ) |
Definition at line 138 of file tsquery_gist.c.
References DatumGetTSQuerySign(), hemdist(), sort-test::key, newval, PG_GETARG_POINTER, and PG_RETURN_POINTER.
Datum gtsquery_picksplit | ( | PG_FUNCTION_ARGS | ) |
Definition at line 168 of file tsquery_gist.c.
References comparecost(), SPLITCOST::cost, FirstOffsetNumber, GETENTRY, hemdist(), j, GistEntryVector::n, OffsetNumberNext, palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, 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, TSQuerySignGetDatum(), and WISH_F.
Datum gtsquery_same | ( | PG_FUNCTION_ARGS | ) |
Definition at line 106 of file tsquery_gist.c.
References a, b, PG_GETARG_POINTER, PG_GETARG_TSQUERYSIGN, and PG_RETURN_POINTER.
Datum gtsquery_union | ( | PG_FUNCTION_ARGS | ) |
Definition at line 88 of file tsquery_gist.c.
References GETENTRY, i, GistEntryVector::n, PG_GETARG_POINTER, PG_RETURN_TSQUERYSIGN, and sign.
|
static |
Definition at line 130 of file tsquery_gist.c.
References a, b, res, and sizebitvec().
Referenced by gtsquery_penalty(), and gtsquery_picksplit().
|
static |
Definition at line 118 of file tsquery_gist.c.
References i, sign, and TSQS_SIGLEN.
Referenced by hemdist().