12 #ifndef _PG_TS_UTILS_H_
13 #define _PG_TS_UTILS_H_
33 char **token,
int *
len,
44 char *token,
int tokenlen,
52 Datum opaque,
bool isplain);
56 char *strval,
int lenval,
int16 weight,
bool prefix);
174 #define TSearchStrategyNumber 1
175 #define TSearchWithClassStrategyNumber 2
194 #define QTN_NEEDFREE 0x01
195 #define QTN_NOCHANGE 0x02
196 #define QTN_WORDFREE 0x04
200 #define TSQS_SIGLEN (sizeof(TSQuerySign)*BITS_PER_BYTE)
202 #define TSQuerySignGetDatum(X) Int64GetDatum((int64) (X))
203 #define DatumGetTSQuerySign(X) ((TSQuerySign) DatumGetInt64(X))
204 #define PG_RETURN_TSQUERYSIGN(X) return TSQuerySignGetDatum(X)
205 #define PG_GETARG_TSQUERYSIGN(n) DatumGetTSQuerySign(PG_GETARG_DATUM(n))
QTNode * QTNCopy(QTNode *in)
Datum prsd_headline(PG_FUNCTION_ARGS)
Datum gin_cmp_tslexeme(PG_FUNCTION_ARGS)
struct TSQueryParserStateData * TSQueryParserState
Datum gtsvector_consistent(PG_FUNCTION_ARGS)
Datum ts_headline_byid_opt(PG_FUNCTION_ARGS)
void pushOperator(TSQueryParserState state, int8 oper, int16 distance)
QTNode * QT2QTN(QueryItem *in, char *operand)
Datum gin_extract_tsvector(PG_FUNCTION_ARGS)
bool QTNEq(QTNode *a, QTNode *b)
QueryItem * clean_NOT(QueryItem *ptr, int32 *len)
struct TSVectorParseStateData * TSVectorParseState
Datum gin_extract_tsquery_5args(PG_FUNCTION_ARGS)
TSQuery parse_tsquery(char *buf, PushFunction pushval, Datum opaque, bool isplain)
void QTNClearFlags(QTNode *in, uint32 flags)
Datum ts_lexize(PG_FUNCTION_ARGS)
Datum gtsquery_consistent_oldsig(PG_FUNCTION_ARGS)
Datum gtsvector_picksplit(PG_FUNCTION_ARGS)
Datum to_tsquery(PG_FUNCTION_ARGS)
void QTNTernary(QTNode *in)
int32 tsCompareString(char *a, int lena, char *b, int lenb, bool prefix)
Datum ts_parse_byid(PG_FUNCTION_ARGS)
Datum prsd_lextype(PG_FUNCTION_ARGS)
Datum prsd_nexttoken(PG_FUNCTION_ARGS)
Datum plainto_tsquery(PG_FUNCTION_ARGS)
Datum gtsquery_consistent(PG_FUNCTION_ARGS)
Datum gtsvector_same(PG_FUNCTION_ARGS)
Datum ts_parse_byname(PG_FUNCTION_ARGS)
void QTNBinary(QTNode *in)
Datum gtsquery_penalty(PG_FUNCTION_ARGS)
bool tsquery_requires_match(QueryItem *curitem)
Datum gin_cmp_prefix(PG_FUNCTION_ARGS)
Datum phraseto_tsquery(PG_FUNCTION_ARGS)
Datum gin_tsquery_consistent(PG_FUNCTION_ARGS)
TSVectorParseState init_tsvector_parser(char *input, bool oprisdelim, bool is_tsquery)
void hlparsetext(Oid cfgId, HeadlineParsedText *prs, TSQuery query, char *buf, int32 buflen)
Datum to_tsvector_byid(PG_FUNCTION_ARGS)
Datum gtsquery_compress(PG_FUNCTION_ARGS)
Datum get_current_ts_config(PG_FUNCTION_ARGS)
TSVector make_tsvector(ParsedText *prs)
Datum gtsvectorin(PG_FUNCTION_ARGS)
void pushStop(TSQueryParserState state)
Datum gtsquery_picksplit(PG_FUNCTION_ARGS)
Datum gin_tsquery_triconsistent(PG_FUNCTION_ARGS)
Datum thesaurus_lexize(PG_FUNCTION_ARGS)
Datum gtsvector_compress(PG_FUNCTION_ARGS)
Datum dsynonym_lexize(PG_FUNCTION_ARGS)
Datum dispell_init(PG_FUNCTION_ARGS)
TSQuery QTN2QT(QTNode *in)
Datum gtsquery_decompress(PG_FUNCTION_ARGS)
void parsetext(Oid cfgId, ParsedText *prs, char *buf, int32 buflen)
Datum gin_extract_tsvector_2args(PG_FUNCTION_ARGS)
void reset_tsvector_parser(TSVectorParseState state, char *input)
Datum gin_extract_tsquery(PG_FUNCTION_ARGS)
void(* PushFunction)(Datum opaque, TSQueryParserState state, char *token, int tokenlen, int16 tokenweights, bool prefix)
Datum to_tsquery_byid(PG_FUNCTION_ARGS)
bool gettoken_tsvector(TSVectorParseState state, char **token, int *len, WordEntryPos **pos, int *poslen, char **endptr)
Datum gtsvector_penalty(PG_FUNCTION_ARGS)
Datum dsimple_lexize(PG_FUNCTION_ARGS)
Datum to_tsvector(PG_FUNCTION_ARGS)
Datum gin_tsquery_consistent_oldsig(PG_FUNCTION_ARGS)
Datum ts_token_type_byid(PG_FUNCTION_ARGS)
Datum gin_tsquery_consistent_6args(PG_FUNCTION_ARGS)
Datum dsimple_init(PG_FUNCTION_ARGS)
Datum prsd_end(PG_FUNCTION_ARGS)
Datum phraseto_tsquery_byid(PG_FUNCTION_ARGS)
bool TS_execute(QueryItem *curitem, void *checkval, bool calcnot, bool(*chkcond)(void *, QueryOperand *, ExecPhraseData *))
Datum dsynonym_init(PG_FUNCTION_ARGS)
QTNode * findsubquery(QTNode *root, QTNode *ex, QTNode *subs, bool *isfind)
Datum ts_token_type_byname(PG_FUNCTION_ARGS)
Datum plainto_tsquery_byid(PG_FUNCTION_ARGS)
Datum gtsvector_decompress(PG_FUNCTION_ARGS)
struct ExecPhraseData ExecPhraseData
int QTNodeCompare(QTNode *an, QTNode *bn)
Datum prsd_start(PG_FUNCTION_ARGS)
Datum gtsquery_union(PG_FUNCTION_ARGS)
TSQuery cleanup_fakeval_and_phrase(TSQuery in)
Datum gtsquery_same(PG_FUNCTION_ARGS)
text * generateHeadline(HeadlineParsedText *prs)
Datum gtsvector_consistent_oldsig(PG_FUNCTION_ARGS)
Datum dispell_lexize(PG_FUNCTION_ARGS)
void pushValue(TSQueryParserState state, char *strval, int lenval, int16 weight, bool prefix)
Datum gtsvectorout(PG_FUNCTION_ARGS)
Datum ts_headline_opt(PG_FUNCTION_ARGS)
Operator oper(ParseState *pstate, List *opname, Oid ltypeId, Oid rtypeId, bool noError, int location)
Datum thesaurus_init(PG_FUNCTION_ARGS)
TSQuerySign makeTSQuerySign(TSQuery a)
Datum ts_headline(PG_FUNCTION_ARGS)
void close_tsvector_parser(TSVectorParseState state)
Datum gtsvector_union(PG_FUNCTION_ARGS)
Datum gin_extract_tsquery_oldsig(PG_FUNCTION_ARGS)
Datum ts_headline_byid(PG_FUNCTION_ARGS)