#include "postgres.h"
#include "access/gist.h"
#include "access/heaptoast.h"
#include "access/reloptions.h"
#include "common/int.h"
#include "lib/qunique.h"
#include "port/pg_bitutils.h"
#include "tsearch/ts_utils.h"
#include "utils/fmgrprotos.h"
#include "utils/pg_crc.h"
Go to the source code of this file.
Definition at line 72 of file tsgistidx.c.
Definition at line 70 of file tsgistidx.c.
Definition at line 84 of file tsgistidx.c.
Definition at line 79 of file tsgistidx.c.
Definition at line 50 of file tsgistidx.c.
Definition at line 37 of file tsgistidx.c.
Definition at line 83 of file tsgistidx.c.
Definition at line 52 of file tsgistidx.c.
Definition at line 49 of file tsgistidx.c.
Definition at line 48 of file tsgistidx.c.
Definition at line 57 of file tsgistidx.c.
Definition at line 81 of file tsgistidx.c.
Definition at line 78 of file tsgistidx.c.
Definition at line 55 of file tsgistidx.c.
Definition at line 54 of file tsgistidx.c.
Definition at line 76 of file tsgistidx.c.
Definition at line 74 of file tsgistidx.c.
Definition at line 75 of file tsgistidx.c.
Definition at line 51 of file tsgistidx.c.
Definition at line 35 of file tsgistidx.c.
Definition at line 36 of file tsgistidx.c.
Definition at line 41 of file tsgistidx.c.
Definition at line 71 of file tsgistidx.c.
Definition at line 578 of file tsgistidx.c.
Definition at line 43 of file tsgistidx.c.
Definition at line 276 of file tsgistidx.c.
References TS_MAYBE, TS_NO, and val.
Referenced by gtsvector_consistent().
Definition at line 308 of file tsgistidx.c.
References GETBIT, GETSIGLEN, GETSIGN, HASHVAL, sort-test::key, TS_MAYBE, TS_NO, and val.
Referenced by gtsvector_consistent().
Definition at line 586 of file tsgistidx.c.
References a, b, and pg_cmp_s32().
Referenced by gtsvector_picksplit().
Definition at line 126 of file tsgistidx.c.
References a, b, and pg_cmp_s32().
Referenced by gtsvector_compress().
Definition at line 567 of file tsgistidx.c.
References CACHESIGN::allistrue, GETSIGN, ISALLTRUE, ISARRKEY, sort-test::key, makesign(), and CACHESIGN::sign.
Referenced by gtsvector_picksplit().
Definition at line 147 of file tsgistidx.c.
References ALLISTRUE, CALCGTSIZE, SignTSVector::flag, flag(), GETSIGN, len, palloc(), SET_VARSIZE(), sign, and SIGNKEY.
Referenced by gtsvector_compress(), gtsvector_picksplit(), and gtsvector_union().
Definition at line 163 of file tsgistidx.c.
References ALLISTRUE, ARRKEY, ARRPTR, CALCGTSIZE, COMP_LEGACY_CRC32, compareint(), DatumGetPointer(), DatumGetTSVector(), FIN_LEGACY_CRC32, GET_SIGLEN, GETARR, GETSIGN, gistentryinit, gtsvector_alloc(), i, INIT_LEGACY_CRC32, ISALLTRUE, ISSIGNKEY, GISTENTRY::key, GISTENTRY::leafkey, WordEntry::len, len, LOOPBYTE, makesign(), GISTENTRY::offset, GISTENTRY::page, palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), WordEntry::pos, qsort, qunique(), GISTENTRY::rel, repalloc(), SET_VARSIZE(), sign, SIGNKEY, STRPTR, TOAST_INDEX_TARGET, val, and VARSIZE().
Definition at line 325 of file tsgistidx.c.
References CHKVAL::arrb, CHKVAL::arre, ARRNELEM, checkcondition_arr(), checkcondition_bit(), DatumGetPointer(), GETARR, GETQUERY, ISALLTRUE, ISSIGNKEY, GISTENTRY::key, sort-test::key, PG_GETARG_POINTER, PG_GETARG_TSQUERY, PG_RETURN_BOOL, TSQueryData::size, TS_EXEC_PHRASE_NO_POS, and TS_execute().
Referenced by gtsvector_consistent_oldsig().
Definition at line 243 of file tsgistidx.c.
References DatumGetPointer(), gistentryinit, GISTENTRY::key, sort-test::key, GISTENTRY::offset, GISTENTRY::page, palloc(), PG_DETOAST_DATUM, PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), and GISTENTRY::rel.
Definition at line 800 of file tsgistidx.c.
References add_local_int_reloption(), init_local_reloptions(), PG_GETARG_POINTER, PG_RETURN_VOID, SIGLEN_DEFAULT, and SIGLEN_MAX.
Definition at line 524 of file tsgistidx.c.
References DatumGetPointer(), GET_SIGLEN, GETSIGN, hemdist(), hemdistsign(), ISALLTRUE, ISARRKEY, GISTENTRY::key, makesign(), newval, palloc(), pfree(), PG_GETARG_POINTER, PG_RETURN_POINTER, SIGLENBIT, sign, and sizebitvec().
Definition at line 612 of file tsgistidx.c.
References ALLISTRUE, comparecost(), SPLITCOST::cost, fillcache(), FirstOffsetNumber, GET_SIGLEN, GETENTRY, GETSIGN, gtsvector_alloc(), hemdistcache(), hemdistsign(), i, ISALLTRUE, j, LOOPBYTE, GistEntryVector::n, OffsetNumberNext, palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), SPLITCOST::pos, qsort, SIGLENBIT, CACHESIGN::sign, sign, SIGNKEY, sizebitvec(), 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.
Definition at line 420 of file tsgistidx.c.
References a, ARRNELEM, Assert(), b, GET_SIGLEN, GETARR, GETSIGLEN, GETSIGN, i, ISALLTRUE, ISSIGNKEY, LOOPBYTE, PG_GETARG_POINTER, and PG_RETURN_POINTER.
Definition at line 393 of file tsgistidx.c.
References ALLISTRUE, CALCGTSIZE, SignTSVector::flag, GET_SIGLEN, GETENTRY, GETSIGN, gtsvector_alloc(), i, GistEntryVector::n, PG_GETARG_POINTER, PG_RETURN_POINTER, SET_VARSIZE(), SIGNKEY, unionkey(), and VARSIZE().
Definition at line 89 of file tsgistidx.c.
References ereport, errcode(), errmsg(), ERROR, and PG_RETURN_VOID.
Definition at line 100 of file tsgistidx.c.
References ARRNELEM, GETSIGLEN, GETSIGN, ISALLTRUE, ISARRKEY, sort-test::key, PG_DETOAST_DATUM, PG_FREE_IF_COPY, PG_GETARG_DATUM, PG_RETURN_POINTER, psprintf(), pstrdup(), SIGLENBIT, and sizebitvec().
Definition at line 503 of file tsgistidx.c.
References a, Assert(), b, GETSIGLEN, GETSIGN, hemdistsign(), ISALLTRUE, SIGLENBIT, and sizebitvec().
Referenced by gtsvector_penalty().
Definition at line 596 of file tsgistidx.c.
References a, b, hemdistsign(), SIGLENBIT, and sizebitvec().
Referenced by gtsvector_picksplit().
Definition at line 487 of file tsgistidx.c.
References a, b, i, LOOPBYTE, and pg_number_of_ones.
Referenced by gtsvector_penalty(), gtsvector_picksplit(), hemdist(), and hemdistcache().
Definition at line 135 of file tsgistidx.c.
References a, ARRNELEM, GETARR, HASH, len, MemSet, and sign.
Referenced by fillcache(), gtsvector_compress(), and gtsvector_penalty().
Definition at line 481 of file tsgistidx.c.
References pg_popcount(), and sign.
Referenced by gtsvector_penalty(), gtsvector_picksplit(), gtsvectorout(), hemdist(), and hemdistcache().