PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/gist.h"
#include "access/stratnum.h"
#include "common/int.h"
#include "tsearch/ts_utils.h"
#include "utils/fmgrprotos.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 23 of file tsquery_gist.c.
Definition at line 164 of file tsquery_gist.c.
|
static |
Definition at line 158 of file tsquery_gist.c.
References a, b, and pg_cmp_s32().
Referenced by gtsquery_picksplit().
Datum gtsquery_compress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 27 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 53 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 139 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 167 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 107 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 89 of file tsquery_gist.c.
References GETENTRY, i, GistEntryVector::n, PG_GETARG_POINTER, PG_RETURN_TSQUERYSIGN, sign, and size.
|
static |
Definition at line 131 of file tsquery_gist.c.
References a, b, res, and sizebitvec().
Referenced by gtsquery_penalty(), and gtsquery_picksplit().
|
static |
Definition at line 119 of file tsquery_gist.c.
References i, sign, size, and TSQS_SIGLEN.
Referenced by hemdist().