PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | QTN2QTState |
Functions | |
QTNode * | QT2QTN (QueryItem *in, char *operand) |
void | QTNFree (QTNode *in) |
int | QTNodeCompare (QTNode *an, QTNode *bn) |
static int | cmpQTN (const void *a, const void *b) |
void | QTNSort (QTNode *in) |
bool | QTNEq (QTNode *a, QTNode *b) |
void | QTNTernary (QTNode *in) |
void | QTNBinary (QTNode *in) |
static void | cntsize (QTNode *in, int *sumlen, int *nnode) |
static void | fillQT (QTN2QTState *state, QTNode *in) |
TSQuery | QTN2QT (QTNode *in) |
QTNode * | QTNCopy (QTNode *in) |
void | QTNClearFlags (QTNode *in, uint32 flags) |
|
static |
Definition at line 153 of file tsquery_util.c.
References a, b, and QTNodeCompare().
Referenced by QTNSort().
|
static |
Definition at line 292 of file tsquery_util.c.
References check_stack_depth(), QTNode::child, i, QueryOperand::length, QTNode::nchild, QI_OPR, QueryItem::qoperand, QueryItem::type, and QTNode::valnode.
Referenced by QTN2QT().
|
static |
Definition at line 323 of file tsquery_util.c.
References Assert, check_stack_depth(), QTNode::child, QueryOperator::left, QueryOperand::length, QTNode::nchild, QI_OPR, QI_VAL, QueryItem::qoperand, QueryItem::qoperator, QueryItem::type, QTNode::valnode, and QTNode::word.
Referenced by QTN2QT().
Definition at line 25 of file tsquery_util.c.
References check_stack_depth(), QTNode::child, QueryOperand::distance, QueryOperator::left, QTNode::nchild, OP_NOT, QueryOperator::oper, palloc0(), QI_OPR, QueryItem::qoperand, QueryItem::qoperator, QTNode::sign, QueryItem::type, QueryOperand::valcrc, QTNode::valnode, and QTNode::word.
Referenced by CompareTSQ(), join_tsqueries(), tsquery_not(), tsquery_rewrite(), and tsquery_rewrite_query().
Definition at line 363 of file tsquery_util.c.
References cntsize(), COMPUTESIZE, ereport, errcode(), errmsg(), ERROR, fillQT(), GETOPERAND, GETQUERY, len, palloc0(), SET_VARSIZE, TSQueryData::size, and TSQUERY_TOO_BIG.
Referenced by tsquery_and(), tsquery_not(), tsquery_or(), tsquery_phrase_distance(), tsquery_rewrite(), and tsquery_rewrite_query().
void QTNBinary | ( | QTNode * | in | ) |
Definition at line 250 of file tsquery_util.c.
References check_stack_depth(), QTNode::child, QTNode::flags, i, QTNode::nchild, QueryOperator::oper, palloc0(), QI_OPR, QueryItem::qoperator, QTN_NEEDFREE, QTNode::sign, QueryItem::type, and QTNode::valnode.
Referenced by tsquery_rewrite(), and tsquery_rewrite_query().
Definition at line 434 of file tsquery_util.c.
References check_stack_depth(), QTNode::child, QTNode::flags, i, QTNode::nchild, QI_VAL, QueryItem::type, and QTNode::valnode.
Referenced by tsquery_rewrite_query().
Definition at line 396 of file tsquery_util.c.
References check_stack_depth(), QTNode::child, QTNode::flags, i, QueryOperand::length, QTNode::nchild, palloc(), QI_VAL, QueryItem::qoperand, QTN_NEEDFREE, QTN_WORDFREE, QueryItem::type, QTNode::valnode, and QTNode::word.
Referenced by findeq().
Definition at line 183 of file tsquery_util.c.
References a, b, QTNodeCompare(), and sign.
Referenced by findeq().
void QTNFree | ( | QTNode * | in | ) |
Definition at line 64 of file tsquery_util.c.
References check_stack_depth(), QTNode::child, QTNode::flags, i, QTNode::nchild, pfree(), QI_OPR, QI_VAL, QTN_NEEDFREE, QTN_WORDFREE, QueryItem::type, QTNode::valnode, and QTNode::word.
Referenced by CompareTSQ(), dofindsubquery(), findeq(), tsquery_and(), tsquery_not(), tsquery_or(), tsquery_phrase_distance(), tsquery_rewrite(), and tsquery_rewrite_query().
Definition at line 97 of file tsquery_util.c.
References check_stack_depth(), QTNode::child, QueryOperator::distance, elog, ERROR, i, QueryOperand::length, QTNode::nchild, OP_PHRASE, QueryOperator::oper, QI_OPR, QI_VAL, QueryItem::qoperand, QueryItem::qoperator, res, tsCompareString(), QueryItem::type, QueryOperand::valcrc, QTNode::valnode, and QTNode::word.
Referenced by cmpQTN(), CompareTSQ(), findeq(), and QTNEq().
void QTNSort | ( | QTNode * | in | ) |
Definition at line 163 of file tsquery_util.c.
References check_stack_depth(), QTNode::child, cmpQTN(), i, QTNode::nchild, OP_PHRASE, QueryOperator::oper, QI_OPR, QueryItem::qoperator, qsort, QueryItem::type, and QTNode::valnode.
Referenced by findeq(), tsquery_rewrite(), and tsquery_rewrite_query().
void QTNTernary | ( | QTNode * | in | ) |
Definition at line 201 of file tsquery_util.c.
References check_stack_depth(), QTNode::child, QTNode::flags, i, QTNode::nchild, OP_AND, OP_OR, QueryOperator::oper, pfree(), QI_OPR, QueryItem::qoperator, QTN_NEEDFREE, repalloc(), QueryItem::type, and QTNode::valnode.
Referenced by tsquery_rewrite(), and tsquery_rewrite_query().