aboutsummaryrefslogtreecommitdiff
path: root/contrib/tsearch2/query.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tsearch2/query.h')
-rw-r--r--contrib/tsearch2/query.h54
1 files changed, 0 insertions, 54 deletions
diff --git a/contrib/tsearch2/query.h b/contrib/tsearch2/query.h
deleted file mode 100644
index 44f87012130..00000000000
--- a/contrib/tsearch2/query.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef __QUERY_H__
-#define __QUERY_H__
-/*
-#define BS_DEBUG
-*/
-
-#include "ts_locale.h"
-/*
- * item in polish notation with back link
- * to left operand
- */
-typedef struct ITEM
-{
- int8 type;
- int8 weight;
- int2 left;
- int4 val;
- /* user-friendly value, must correlate with WordEntry */
- uint32
- istrue:1, /* use for ranking in Cover */
- length:11,
- distance:20;
-} ITEM;
-
-/*
- *Storage:
- * (len)(size)(array of ITEM)(array of operand in user-friendly form)
- */
-typedef struct
-{
- int32 vl_len_; /* varlena header (do not touch directly!) */
- int4 size;
- char data[1];
-} QUERYTYPE;
-
-#define HDRSIZEQT ( VARHDRSZ + sizeof(int4) )
-#define COMPUTESIZE(size,lenofoperand) ( HDRSIZEQT + (size) * sizeof(ITEM) + (lenofoperand) )
-#define GETQUERY(x) (ITEM*)( (char*)(x)+HDRSIZEQT )
-#define GETOPERAND(x) ( (char*)GETQUERY(x) + ((QUERYTYPE*)(x))->size * sizeof(ITEM) )
-
-#define ISOPERATOR(x) ( pg_mblen(x)==1 && ( *(x)=='!' || *(x)=='&' || *(x)=='|' || *(x)=='(' || *(x)==')' ) )
-
-#define END 0
-#define ERR 1
-#define VAL 2
-#define OPR 3
-#define OPEN 4
-#define CLOSE 5
-#define VALSTOP 6 /* for stop words */
-
-bool TS_execute(ITEM * curitem, void *checkval,
- bool calcnot, bool (*chkcond) (void *checkval, ITEM * val));
-
-#endif