PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | WordEntry |
struct | WordEntryPosVector |
struct | WordEntryPosVector1 |
struct | TSVectorData |
struct | QueryOperand |
struct | QueryOperator |
union | QueryItem |
struct | TSQueryData |
Macros | |
#define | MAXSTRLEN ( (1<<11) - 1) |
#define | MAXSTRPOS ( (1<<20) - 1) |
#define | WEP_GETWEIGHT(x) ( (x) >> 14 ) |
#define | WEP_GETPOS(x) ( (x) & 0x3fff ) |
#define | WEP_SETWEIGHT(x, v) ( (x) = ( (v) << 14 ) | ( (x) & 0x3fff ) ) |
#define | WEP_SETPOS(x, v) ( (x) = ( (x) & 0xc000 ) | ( (v) & 0x3fff ) ) |
#define | MAXENTRYPOS (1<<14) |
#define | MAXNUMPOS (256) |
#define | LIMITPOS(x) ( ( (x) >= MAXENTRYPOS ) ? (MAXENTRYPOS-1) : (x) ) |
#define | DATAHDRSIZE (offsetof(TSVectorData, entries)) |
#define | CALCDATASIZE(nentries, lenstr) (DATAHDRSIZE + (nentries) * sizeof(WordEntry) + (lenstr) ) |
#define | ARRPTR(x) ( (x)->entries ) |
#define | STRPTR(x) ( (char *) &(x)->entries[(x)->size] ) |
#define | _POSVECPTR(x, e) ((WordEntryPosVector *)(STRPTR(x) + SHORTALIGN((e)->pos + (e)->len))) |
#define | POSDATALEN(x, e) ( ( (e)->haspos ) ? (_POSVECPTR(x,e)->npos) : 0 ) |
#define | POSDATAPTR(x, e) (_POSVECPTR(x,e)->pos) |
#define | PG_GETARG_TSVECTOR(n) DatumGetTSVector(PG_GETARG_DATUM(n)) |
#define | PG_GETARG_TSVECTOR_COPY(n) DatumGetTSVectorCopy(PG_GETARG_DATUM(n)) |
#define | PG_RETURN_TSVECTOR(x) return TSVectorGetDatum(x) |
#define | QI_VAL 1 |
#define | QI_OPR 2 |
#define | QI_VALSTOP |
#define | OP_NOT 1 |
#define | OP_AND 2 |
#define | OP_OR 3 |
#define | OP_PHRASE 4 /* highest code, tsquery_cleanup.c */ |
#define | OP_COUNT 4 |
#define | OP_PRIORITY(x) ( tsearch_op_priority[(x) - 1] ) |
#define | QO_PRIORITY(x) OP_PRIORITY(((QueryOperator *) (x))->oper) |
#define | HDRSIZETQ ( VARHDRSZ + sizeof(int32) ) |
#define | COMPUTESIZE(size, lenofoperand) ( HDRSIZETQ + (size) * sizeof(QueryItem) + (lenofoperand) ) |
#define | TSQUERY_TOO_BIG(size, lenofoperand) ((size) > (MaxAllocSize - HDRSIZETQ - (lenofoperand)) / sizeof(QueryItem)) |
#define | GETQUERY(x) ((QueryItem*)( (char*)(x)+HDRSIZETQ )) |
#define | GETOPERAND(x) ( (char*)GETQUERY(x) + ((TSQuery)(x))->size * sizeof(QueryItem) ) |
#define | PG_GETARG_TSQUERY(n) DatumGetTSQuery(PG_GETARG_DATUM(n)) |
#define | PG_GETARG_TSQUERY_COPY(n) DatumGetTSQueryCopy(PG_GETARG_DATUM(n)) |
#define | PG_RETURN_TSQUERY(x) return TSQueryGetDatum(x) |
Typedefs | |
typedef uint16 | WordEntryPos |
typedef TSVectorData * | TSVector |
typedef int8 | QueryItemType |
typedef TSQueryData * | TSQuery |
Functions | |
int | compareWordEntryPos (const void *a, const void *b) |
static TSVector | DatumGetTSVector (Datum X) |
static TSVector | DatumGetTSVectorCopy (Datum X) |
static Datum | TSVectorGetDatum (const TSVectorData *X) |
static TSQuery | DatumGetTSQuery (Datum X) |
static TSQuery | DatumGetTSQueryCopy (Datum X) |
static Datum | TSQueryGetDatum (const TSQueryData *X) |
Variables | |
PGDLLIMPORT const int | tsearch_op_priority [OP_COUNT] |
#define _POSVECPTR | ( | x, | |
e | |||
) | ((WordEntryPosVector *)(STRPTR(x) + SHORTALIGN((e)->pos + (e)->len))) |
#define CALCDATASIZE | ( | nentries, | |
lenstr | |||
) | (DATAHDRSIZE + (nentries) * sizeof(WordEntry) + (lenstr) ) |
#define DATAHDRSIZE (offsetof(TSVectorData, entries)) |
#define LIMITPOS | ( | x | ) | ( ( (x) >= MAXENTRYPOS ) ? (MAXENTRYPOS-1) : (x) ) |
#define OP_PHRASE 4 /* highest code, tsquery_cleanup.c */ |
#define OP_PRIORITY | ( | x | ) | ( tsearch_op_priority[(x) - 1] ) |
#define PG_GETARG_TSQUERY | ( | n | ) | DatumGetTSQuery(PG_GETARG_DATUM(n)) |
#define PG_GETARG_TSQUERY_COPY | ( | n | ) | DatumGetTSQueryCopy(PG_GETARG_DATUM(n)) |
#define PG_GETARG_TSVECTOR | ( | n | ) | DatumGetTSVector(PG_GETARG_DATUM(n)) |
#define PG_GETARG_TSVECTOR_COPY | ( | n | ) | DatumGetTSVectorCopy(PG_GETARG_DATUM(n)) |
#define PG_RETURN_TSQUERY | ( | x | ) | return TSQueryGetDatum(x) |
#define PG_RETURN_TSVECTOR | ( | x | ) | return TSVectorGetDatum(x) |
#define QI_VALSTOP |
#define QO_PRIORITY | ( | x | ) | OP_PRIORITY(((QueryOperator *) (x))->oper) |
#define TSQUERY_TOO_BIG | ( | size, | |
lenofoperand | |||
) | ((size) > (MaxAllocSize - HDRSIZETQ - (lenofoperand)) / sizeof(QueryItem)) |
typedef int8 QueryItemType |
typedef TSQueryData* TSQuery |
typedef TSVectorData* TSVector |
typedef uint16 WordEntryPos |
int compareWordEntryPos | ( | const void * | a, |
const void * | b | ||
) |
Definition at line 36 of file tsvector.c.
References a, b, pg_cmp_s32(), and WEP_GETPOS.
Referenced by checkcondition_str(), and uniquePos().
Definition at line 249 of file ts_type.h.
References DatumGetPointer().
Referenced by gtsquery_compress(), ts_match_tt(), tsquery_rewrite_query(), and tsquerysel().
Definition at line 118 of file ts_type.h.
References PG_DETOAST_DATUM.
Referenced by compute_tsvector_stats(), gtsvector_compress(), ts_accum(), ts_match_tq(), and ts_match_tt().
|
inlinestatic |
Definition at line 261 of file ts_type.h.
References PointerGetDatum().
Referenced by ts_match_tq(), and ts_match_tt().
|
inlinestatic |
Definition at line 130 of file ts_type.h.
References PointerGetDatum().
Referenced by compute_tsvector_stats(), ts_match_tq(), ts_match_tt(), and tsvector_update_trigger().
|
extern |