102 if (
an->valnode->type !=
bn->valnode->type)
103 return (
an->valnode->type >
bn->valnode->type) ? -1 : 1;
110 if (
ao->oper !=
bo->oper)
111 return (
ao->oper >
bo->oper) ? -1 : 1;
113 if (
an->nchild !=
bn->nchild)
114 return (
an->nchild >
bn->nchild) ? -1 : 1;
120 for (
i = 0;
i <
an->nchild;
i++)
126 return (
ao->distance >
bo->distance) ? -1 : 1;
130 else if (
an->valnode->type ==
QI_VAL)
135 if (
ao->valcrc !=
bo->valcrc)
137 return (
ao->valcrc >
bo->valcrc) ? -1 : 1;
144 elog(
ERROR,
"unrecognized QueryItem type: %d",
an->valnode->type);
275 nn->
sign =
nn->child[0]->sign |
nn->child[1]->sign;
333 state->curitem->qoperand.distance =
state->curoperand -
state->operand;
376 errmsg(
"tsquery is too large")));
#define COMPUTESIZE(size)
#define Assert(condition)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define palloc_object(type)
#define repalloc_array(pointer, type, count)
#define palloc_array(type, count)
#define palloc0_array(type, count)
#define palloc0_object(type)
void pfree(void *pointer)
void * palloc0(Size size)
#define qsort(a, b, c, d)
void check_stack_depth(void)
#define TSQUERY_TOO_BIG(size, lenofoperand)
void QTNClearFlags(QTNode *in, uint32 flags)
int QTNodeCompare(QTNode *an, QTNode *bn)
QTNode * QTNCopy(QTNode *in)
static void cntsize(QTNode *in, int *sumlen, int *nnode)
static int cmpQTN(const void *a, const void *b)
void QTNTernary(QTNode *in)
bool QTNEq(QTNode *a, QTNode *b)
static void fillQT(QTN2QTState *state, QTNode *in)
QTNode * QT2QTN(QueryItem *in, char *operand)
TSQuery QTN2QT(QTNode *in)
void QTNBinary(QTNode *in)
int32 tsCompareString(char *a, int lena, char *b, int lenb, bool prefix)
static void SET_VARSIZE(void *PTR, Size len)