|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "lib/qunique.h"#include "tsearch/ts_utils.h"#include "utils/fmgrprotos.h"#include "varatt.h"
Go to the source code of this file.
Macros | |
| #define | CMPFUNC(NAME, CONDITION) |
Functions | |
| Datum | tsquery_numnode (PG_FUNCTION_ARGS) |
| static QTNode * | join_tsqueries (TSQuery a, TSQuery b, int8 operator, uint16 distance) |
| Datum | tsquery_and (PG_FUNCTION_ARGS) |
| Datum | tsquery_or (PG_FUNCTION_ARGS) |
| Datum | tsquery_phrase_distance (PG_FUNCTION_ARGS) |
| Datum | tsquery_phrase (PG_FUNCTION_ARGS) |
| Datum | tsquery_not (PG_FUNCTION_ARGS) |
| static int | CompareTSQ (TSQuery a, TSQuery b) |
| Datum | tsquery_cmp (PG_FUNCTION_ARGS) |
| CMPFUNC (tsquery_lt, res< 0) | |
| CMPFUNC (tsquery_le, res<=0) | |
| CMPFUNC (tsquery_eq, res==0) | |
| CMPFUNC (tsquery_ge, res >=0) | |
| CMPFUNC (tsquery_gt, res > 0) | |
| CMPFUNC (tsquery_ne, res !=0) | |
| TSQuerySign | makeTSQuerySign (TSQuery a) |
| static char ** | collectTSQueryValues (TSQuery a, int *nvalues_p) |
| static int | cmp_string (const void *a, const void *b) |
| Datum | tsq_mcontains (PG_FUNCTION_ARGS) |
| Datum | tsq_mcontained (PG_FUNCTION_ARGS) |
| #define CMPFUNC | ( | NAME, | |
| CONDITION | |||
| ) |
Definition at line 227 of file tsquery_op.c.
|
static |
Definition at line 298 of file tsquery_op.c.
Referenced by tsq_mcontains().
| CMPFUNC | ( | tsquery_eq | , |
| res | = =0 |
||
| ) |
| CMPFUNC | ( | tsquery_ge | , |
| res >= | 0 | ||
| ) |
| CMPFUNC | ( | tsquery_gt | , |
| res | , | ||
| 0 | |||
| ) |
| CMPFUNC | ( | tsquery_le | , |
| res<= | 0 | ||
| ) |
| CMPFUNC | ( | tsquery_lt | ) |
| CMPFUNC | ( | tsquery_ne | , |
| res ! | = 0 |
||
| ) |
|
static |
Definition at line 267 of file tsquery_op.c.
References a, QueryOperand::distance, GETOPERAND, GETQUERY, i, len, QueryOperand::length, palloc(), QI_VAL, QueryItem::qoperand, QueryItem::type, val, and values.
Referenced by tsq_mcontains().
Definition at line 189 of file tsquery_op.c.
References a, b, GETOPERAND, GETQUERY, QT2QTN(), QTNFree(), QTNodeCompare(), and VARSIZE().
Referenced by tsquery_cmp().
Definition at line 33 of file tsquery_op.c.
References a, b, QTNode::child, QueryOperator::distance, QTNode::flags, GETOPERAND, GETQUERY, QTNode::nchild, OP_PHRASE, QueryOperator::oper, palloc0(), QI_OPR, QueryItem::qoperator, QT2QTN(), QTN_NEEDFREE, QueryItem::type, and QTNode::valnode.
Referenced by tsquery_and(), tsquery_or(), and tsquery_phrase_distance().
| TSQuerySign makeTSQuerySign | ( | TSQuery | a | ) |
Definition at line 250 of file tsquery_op.c.
References a, GETQUERY, i, QI_VAL, QueryItem::qoperand, sign, TSQS_SIGLEN, QueryItem::type, and QueryOperand::valcrc.
Referenced by gtsquery_compress(), and gtsquery_consistent().
| Datum tsq_mcontained | ( | PG_FUNCTION_ARGS | ) |
Definition at line 354 of file tsquery_op.c.
References DirectFunctionCall2, PG_GETARG_DATUM, PG_RETURN_DATUM, and tsq_mcontains().
| Datum tsq_mcontains | ( | PG_FUNCTION_ARGS | ) |
Definition at line 307 of file tsquery_op.c.
References cmp_string(), collectTSQueryValues(), i, j, PG_GETARG_TSQUERY, PG_RETURN_BOOL, qsort, and qunique().
Referenced by tsq_mcontained().
| Datum tsquery_and | ( | PG_FUNCTION_ARGS | ) |
Definition at line 54 of file tsquery_op.c.
References a, b, join_tsqueries(), OP_AND, PG_FREE_IF_COPY, PG_GETARG_TSQUERY_COPY, PG_RETURN_POINTER, PG_RETURN_TSQUERY, QTN2QT(), and QTNFree().
| Datum tsquery_cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 215 of file tsquery_op.c.
References a, b, CompareTSQ(), PG_FREE_IF_COPY, PG_GETARG_TSQUERY_COPY, and PG_RETURN_INT32.
| Datum tsquery_not | ( | PG_FUNCTION_ARGS | ) |
Definition at line 159 of file tsquery_op.c.
References a, QTNode::child, QTNode::flags, GETOPERAND, GETQUERY, QTNode::nchild, OP_NOT, QueryOperator::oper, palloc0(), PG_FREE_IF_COPY, PG_GETARG_TSQUERY_COPY, PG_RETURN_POINTER, QI_OPR, QueryItem::qoperator, QT2QTN(), QTN2QT(), QTN_NEEDFREE, QTNFree(), QueryItem::type, and QTNode::valnode.
| Datum tsquery_numnode | ( | PG_FUNCTION_ARGS | ) |
Definition at line 23 of file tsquery_op.c.
References PG_FREE_IF_COPY, PG_GETARG_TSQUERY, PG_RETURN_INT32, and TSQueryData::size.
| Datum tsquery_or | ( | PG_FUNCTION_ARGS | ) |
Definition at line 84 of file tsquery_op.c.
References a, b, join_tsqueries(), OP_OR, PG_FREE_IF_COPY, PG_GETARG_TSQUERY_COPY, PG_RETURN_POINTER, PG_RETURN_TSQUERY, QTN2QT(), and QTNFree().
| Datum tsquery_phrase | ( | PG_FUNCTION_ARGS | ) |
Definition at line 150 of file tsquery_op.c.
References DirectFunctionCall3, Int32GetDatum(), PG_GETARG_DATUM, PG_RETURN_DATUM, and tsquery_phrase_distance().
| Datum tsquery_phrase_distance | ( | PG_FUNCTION_ARGS | ) |
Definition at line 114 of file tsquery_op.c.
References a, b, ereport, errcode(), errmsg(), ERROR, join_tsqueries(), MAXENTRYPOS, OP_PHRASE, PG_FREE_IF_COPY, PG_GETARG_INT32, PG_GETARG_TSQUERY_COPY, PG_RETURN_POINTER, PG_RETURN_TSQUERY, QTN2QT(), and QTNFree().
Referenced by tsquery_phrase().