PostgreSQL Source Code  git master
tsginidx.c File Reference
#include "postgres.h"
#include "access/gin.h"
#include "access/stratnum.h"
#include "miscadmin.h"
#include "tsearch/ts_type.h"
#include "tsearch/ts_utils.h"
#include "utils/builtins.h"
Include dependency graph for tsginidx.c:

Go to the source code of this file.

Data Structures

struct  GinChkVal
 

Functions

Datum gin_cmp_tslexeme (PG_FUNCTION_ARGS)
 
Datum gin_cmp_prefix (PG_FUNCTION_ARGS)
 
Datum gin_extract_tsvector (PG_FUNCTION_ARGS)
 
Datum gin_extract_tsquery (PG_FUNCTION_ARGS)
 
static GinTernaryValue checkcondition_gin_internal (GinChkVal *gcv, QueryOperand *val, ExecPhraseData *data)
 
static bool checkcondition_gin (void *checkval, QueryOperand *val, ExecPhraseData *data)
 
static GinTernaryValue TS_execute_ternary (GinChkVal *gcv, QueryItem *curitem, bool in_phrase)
 
Datum gin_tsquery_consistent (PG_FUNCTION_ARGS)
 
Datum gin_tsquery_triconsistent (PG_FUNCTION_ARGS)
 
Datum gin_extract_tsvector_2args (PG_FUNCTION_ARGS)
 
Datum gin_extract_tsquery_5args (PG_FUNCTION_ARGS)
 
Datum gin_tsquery_consistent_6args (PG_FUNCTION_ARGS)
 
Datum gin_extract_tsquery_oldsig (PG_FUNCTION_ARGS)
 
Datum gin_tsquery_consistent_oldsig (PG_FUNCTION_ARGS)
 

Function Documentation

◆ checkcondition_gin()

static bool checkcondition_gin ( void *  checkval,
QueryOperand val,
ExecPhraseData data 
)
static

Definition at line 204 of file tsginidx.c.

References checkcondition_gin_internal(), and GIN_FALSE.

Referenced by gin_tsquery_consistent().

205 {
206  return checkcondition_gin_internal((GinChkVal *) checkval,
207  val,
208  data) != GIN_FALSE;
209 }
static GinTernaryValue checkcondition_gin_internal(GinChkVal *gcv, QueryOperand *val, ExecPhraseData *data)
Definition: tsginidx.c:182
#define GIN_FALSE
Definition: gin.h:59

◆ checkcondition_gin_internal()

static GinTernaryValue checkcondition_gin_internal ( GinChkVal gcv,
QueryOperand val,
ExecPhraseData data 
)
static

Definition at line 182 of file tsginidx.c.

References GinChkVal::check, GinChkVal::first_item, GinChkVal::map_item_operand, GinChkVal::need_recheck, and QueryOperand::weight.

Referenced by checkcondition_gin(), and TS_execute_ternary().

183 {
184  int j;
185 
186  /*
187  * if any val requiring a weight is used or caller needs position
188  * information then set recheck flag
189  */
190  if (val->weight != 0 || data != NULL)
191  *(gcv->need_recheck) = true;
192 
193  /* convert item's number to corresponding entry's (operand's) number */
194  j = gcv->map_item_operand[((QueryItem *) val) - gcv->first_item];
195 
196  /* return presence of current entry in indexed value */
197  return gcv->check[j];
198 }
uint8 weight
Definition: ts_type.h:146
QueryItem * first_item
Definition: tsginidx.c:175
bool * need_recheck
Definition: tsginidx.c:178
GinTernaryValue * check
Definition: tsginidx.c:176
int * map_item_operand
Definition: tsginidx.c:177

◆ gin_cmp_prefix()

Datum gin_cmp_prefix ( PG_FUNCTION_ARGS  )

Definition at line 41 of file tsginidx.c.

References cmp(), PG_FREE_IF_COPY, PG_GETARG_POINTER, PG_GETARG_TEXT_PP, PG_GETARG_UINT16, PG_RETURN_INT32, tsCompareString(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.

42 {
43  text *a = PG_GETARG_TEXT_PP(0);
44  text *b = PG_GETARG_TEXT_PP(1);
45 
46 #ifdef NOT_USED
47  StrategyNumber strategy = PG_GETARG_UINT16(2);
48  Pointer extra_data = PG_GETARG_POINTER(3);
49 #endif
50  int cmp;
51 
54  true);
55 
56  if (cmp < 0)
57  cmp = 1; /* prevent continue scan */
58 
59  PG_FREE_IF_COPY(a, 0);
60  PG_FREE_IF_COPY(b, 1);
61  PG_RETURN_INT32(cmp);
62 }
#define VARDATA_ANY(PTR)
Definition: postgres.h:347
#define PG_RETURN_INT32(x)
Definition: fmgr.h:314
uint16 StrategyNumber
Definition: stratnum.h:22
#define PG_GETARG_POINTER(n)
Definition: fmgr.h:241
#define PG_GETARG_TEXT_PP(n)
Definition: fmgr.h:273
char * Pointer
Definition: c.h:273
#define PG_FREE_IF_COPY(ptr, n)
Definition: fmgr.h:225
int32 tsCompareString(char *a, int lena, char *b, int lenb, bool prefix)
Definition: tsvector_op.c:1160
#define PG_GETARG_UINT16(n)
Definition: fmgr.h:237
#define VARSIZE_ANY_EXHDR(PTR)
Definition: postgres.h:340
Definition: c.h:487
static int cmp(const chr *x, const chr *y, size_t len)
Definition: regc_locale.c:742

◆ gin_cmp_tslexeme()

Datum gin_cmp_tslexeme ( PG_FUNCTION_ARGS  )

Definition at line 25 of file tsginidx.c.

References cmp(), PG_FREE_IF_COPY, PG_GETARG_TEXT_PP, PG_RETURN_INT32, tsCompareString(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.

26 {
27  text *a = PG_GETARG_TEXT_PP(0);
28  text *b = PG_GETARG_TEXT_PP(1);
29  int cmp;
30 
33  false);
34 
35  PG_FREE_IF_COPY(a, 0);
36  PG_FREE_IF_COPY(b, 1);
37  PG_RETURN_INT32(cmp);
38 }
#define VARDATA_ANY(PTR)
Definition: postgres.h:347
#define PG_RETURN_INT32(x)
Definition: fmgr.h:314
#define PG_GETARG_TEXT_PP(n)
Definition: fmgr.h:273
#define PG_FREE_IF_COPY(ptr, n)
Definition: fmgr.h:225
int32 tsCompareString(char *a, int lena, char *b, int lenb, bool prefix)
Definition: tsvector_op.c:1160
#define VARSIZE_ANY_EXHDR(PTR)
Definition: postgres.h:340
Definition: c.h:487
static int cmp(const chr *x, const chr *y, size_t len)
Definition: regc_locale.c:742

◆ gin_extract_tsquery()

Datum gin_extract_tsquery ( PG_FUNCTION_ARGS  )

Definition at line 95 of file tsginidx.c.

References cstring_to_text_with_len(), QueryOperand::distance, GETOPERAND, GETQUERY, GIN_SEARCH_MODE_ALL, GIN_SEARCH_MODE_DEFAULT, i, QueryOperand::length, palloc(), palloc0(), PG_FREE_IF_COPY, PG_GETARG_POINTER, PG_GETARG_TSQUERY, PG_RETURN_POINTER, PointerGetDatum, QueryOperand::prefix, QI_VAL, QueryItem::qoperand, TSQueryData::size, tsquery_requires_match(), generate_unaccent_rules::type, and val.

Referenced by gin_extract_tsquery_5args(), and gin_extract_tsquery_oldsig().

96 {
97  TSQuery query = PG_GETARG_TSQUERY(0);
98  int32 *nentries = (int32 *) PG_GETARG_POINTER(1);
99 
100  /* StrategyNumber strategy = PG_GETARG_UINT16(2); */
101  bool **ptr_partialmatch = (bool **) PG_GETARG_POINTER(3);
102  Pointer **extra_data = (Pointer **) PG_GETARG_POINTER(4);
103 
104  /* bool **nullFlags = (bool **) PG_GETARG_POINTER(5); */
105  int32 *searchMode = (int32 *) PG_GETARG_POINTER(6);
106  Datum *entries = NULL;
107 
108  *nentries = 0;
109 
110  if (query->size > 0)
111  {
112  QueryItem *item = GETQUERY(query);
113  int32 i,
114  j;
115  bool *partialmatch;
116  int *map_item_operand;
117 
118  /*
119  * If the query doesn't have any required positive matches (for
120  * instance, it's something like '! foo'), we have to do a full index
121  * scan.
122  */
123  if (tsquery_requires_match(item))
124  *searchMode = GIN_SEARCH_MODE_DEFAULT;
125  else
126  *searchMode = GIN_SEARCH_MODE_ALL;
127 
128  /* count number of VAL items */
129  j = 0;
130  for (i = 0; i < query->size; i++)
131  {
132  if (item[i].type == QI_VAL)
133  j++;
134  }
135  *nentries = j;
136 
137  entries = (Datum *) palloc(sizeof(Datum) * j);
138  partialmatch = *ptr_partialmatch = (bool *) palloc(sizeof(bool) * j);
139 
140  /*
141  * Make map to convert item's number to corresponding operand's (the
142  * same, entry's) number. Entry's number is used in check array in
143  * consistent method. We use the same map for each entry.
144  */
145  *extra_data = (Pointer *) palloc(sizeof(Pointer) * j);
146  map_item_operand = (int *) palloc0(sizeof(int) * query->size);
147 
148  /* Now rescan the VAL items and fill in the arrays */
149  j = 0;
150  for (i = 0; i < query->size; i++)
151  {
152  if (item[i].type == QI_VAL)
153  {
154  QueryOperand *val = &item[i].qoperand;
155  text *txt;
156 
157  txt = cstring_to_text_with_len(GETOPERAND(query) + val->distance,
158  val->length);
159  entries[j] = PointerGetDatum(txt);
160  partialmatch[j] = val->prefix;
161  (*extra_data)[j] = (Pointer) map_item_operand;
162  map_item_operand[i] = j;
163  j++;
164  }
165  }
166  }
167 
168  PG_FREE_IF_COPY(query, 0);
169 
170  PG_RETURN_POINTER(entries);
171 }
#define PG_RETURN_POINTER(x)
Definition: fmgr.h:321
#define PointerGetDatum(X)
Definition: postgres.h:562
#define PG_GETARG_TSQUERY(n)
Definition: ts_type.h:238
bool tsquery_requires_match(QueryItem *curitem)
Definition: tsvector_op.c:1865
#define QI_VAL
Definition: ts_type.h:134
#define PG_GETARG_POINTER(n)
Definition: fmgr.h:241
uint32 distance
Definition: ts_type.h:158
#define GETQUERY(x)
Definition: _int.h:142
signed int int32
Definition: c.h:284
#define GETOPERAND(x)
Definition: ltree.h:118
#define GIN_SEARCH_MODE_ALL
Definition: gin.h:35
char * Pointer
Definition: c.h:273
text * cstring_to_text_with_len(const char *s, int len)
Definition: varlena.c:162
void * palloc0(Size size)
Definition: mcxt.c:877
uintptr_t Datum
Definition: postgres.h:372
#define GIN_SEARCH_MODE_DEFAULT
Definition: gin.h:33
#define PG_FREE_IF_COPY(ptr, n)
Definition: fmgr.h:225
uint32 length
Definition: ts_type.h:158
void * palloc(Size size)
Definition: mcxt.c:848
int32 size
Definition: ts_type.h:208
int i
Definition: c.h:487
bool prefix
Definition: ts_type.h:150
QueryOperand qoperand
Definition: ts_type.h:197
long val
Definition: informix.c:689

◆ gin_extract_tsquery_5args()

Datum gin_extract_tsquery_5args ( PG_FUNCTION_ARGS  )

Definition at line 384 of file tsginidx.c.

References elog, ERROR, gin_extract_tsquery(), and PG_NARGS.

385 {
386  if (PG_NARGS() < 7) /* should not happen */
387  elog(ERROR, "gin_extract_tsquery requires seven arguments");
388  return gin_extract_tsquery(fcinfo);
389 }
#define ERROR
Definition: elog.h:43
#define PG_NARGS()
Definition: fmgr.h:168
Datum gin_extract_tsquery(PG_FUNCTION_ARGS)
Definition: tsginidx.c:95
#define elog
Definition: elog.h:219

◆ gin_extract_tsquery_oldsig()

Datum gin_extract_tsquery_oldsig ( PG_FUNCTION_ARGS  )

Definition at line 408 of file tsginidx.c.

References gin_extract_tsquery().

409 {
410  return gin_extract_tsquery(fcinfo);
411 }
Datum gin_extract_tsquery(PG_FUNCTION_ARGS)
Definition: tsginidx.c:95

◆ gin_extract_tsvector()

Datum gin_extract_tsvector ( PG_FUNCTION_ARGS  )

Definition at line 65 of file tsginidx.c.

References ARRPTR, cstring_to_text_with_len(), i, WordEntry::len, palloc(), PG_FREE_IF_COPY, PG_GETARG_POINTER, PG_GETARG_TSVECTOR, PG_RETURN_POINTER, PointerGetDatum, WordEntry::pos, TSVectorData::size, and STRPTR.

Referenced by gin_extract_tsvector_2args().

66 {
67  TSVector vector = PG_GETARG_TSVECTOR(0);
68  int32 *nentries = (int32 *) PG_GETARG_POINTER(1);
69  Datum *entries = NULL;
70 
71  *nentries = vector->size;
72  if (vector->size > 0)
73  {
74  int i;
75  WordEntry *we = ARRPTR(vector);
76 
77  entries = (Datum *) palloc(sizeof(Datum) * vector->size);
78 
79  for (i = 0; i < vector->size; i++)
80  {
81  text *txt;
82 
83  txt = cstring_to_text_with_len(STRPTR(vector) + we->pos, we->len);
84  entries[i] = PointerGetDatum(txt);
85 
86  we++;
87  }
88  }
89 
90  PG_FREE_IF_COPY(vector, 0);
91  PG_RETURN_POINTER(entries);
92 }
#define PG_RETURN_POINTER(x)
Definition: fmgr.h:321
#define PointerGetDatum(X)
Definition: postgres.h:562
uint32 len
Definition: ts_type.h:44
#define PG_GETARG_POINTER(n)
Definition: fmgr.h:241
signed int int32
Definition: c.h:284
text * cstring_to_text_with_len(const char *s, int len)
Definition: varlena.c:162
int32 size
Definition: ts_type.h:93
uintptr_t Datum
Definition: postgres.h:372
#define PG_FREE_IF_COPY(ptr, n)
Definition: fmgr.h:225
uint32 pos
Definition: ts_type.h:44
void * palloc(Size size)
Definition: mcxt.c:848
#define STRPTR(x)
Definition: hstore.h:76
int i
#define PG_GETARG_TSVECTOR(n)
Definition: ts_type.h:120
Definition: c.h:487
#define ARRPTR(x)
Definition: cube.c:26

◆ gin_extract_tsvector_2args()

Datum gin_extract_tsvector_2args ( PG_FUNCTION_ARGS  )

Definition at line 372 of file tsginidx.c.

References elog, ERROR, gin_extract_tsvector(), and PG_NARGS.

373 {
374  if (PG_NARGS() < 3) /* should not happen */
375  elog(ERROR, "gin_extract_tsvector requires three arguments");
376  return gin_extract_tsvector(fcinfo);
377 }
Datum gin_extract_tsvector(PG_FUNCTION_ARGS)
Definition: tsginidx.c:65
#define ERROR
Definition: elog.h:43
#define PG_NARGS()
Definition: fmgr.h:168
#define elog
Definition: elog.h:219

◆ gin_tsquery_consistent()

Datum gin_tsquery_consistent ( PG_FUNCTION_ARGS  )

Definition at line 288 of file tsginidx.c.

References GinChkVal::check, checkcondition_gin(), GinChkVal::first_item, GETQUERY, GinChkVal::map_item_operand, GinChkVal::need_recheck, PG_GETARG_POINTER, PG_GETARG_TSQUERY, PG_RETURN_BOOL, TSQueryData::size, TS_EXEC_CALC_NOT, TS_EXEC_PHRASE_NO_POS, and TS_execute().

Referenced by gin_tsquery_consistent_6args(), and gin_tsquery_consistent_oldsig().

289 {
290  bool *check = (bool *) PG_GETARG_POINTER(0);
291 
292  /* StrategyNumber strategy = PG_GETARG_UINT16(1); */
293  TSQuery query = PG_GETARG_TSQUERY(2);
294 
295  /* int32 nkeys = PG_GETARG_INT32(3); */
296  Pointer *extra_data = (Pointer *) PG_GETARG_POINTER(4);
297  bool *recheck = (bool *) PG_GETARG_POINTER(5);
298  bool res = false;
299 
300  /* Initially assume query doesn't require recheck */
301  *recheck = false;
302 
303  if (query->size > 0)
304  {
305  GinChkVal gcv;
306 
307  /*
308  * check-parameter array has one entry for each value (operand) in the
309  * query.
310  */
311  gcv.first_item = GETQUERY(query);
312  gcv.check = check;
313  gcv.map_item_operand = (int *) (extra_data[0]);
314  gcv.need_recheck = recheck;
315 
316  res = TS_execute(GETQUERY(query),
317  &gcv,
320  }
321 
322  PG_RETURN_BOOL(res);
323 }
bool TS_execute(QueryItem *curitem, void *arg, uint32 flags, TSExecuteCallback chkcond)
Definition: tsvector_op.c:1815
#define TS_EXEC_CALC_NOT
Definition: ts_utils.h:167
#define PG_GETARG_TSQUERY(n)
Definition: ts_type.h:238
static bool checkcondition_gin(void *checkval, QueryOperand *val, ExecPhraseData *data)
Definition: tsginidx.c:204
#define PG_GETARG_POINTER(n)
Definition: fmgr.h:241
#define GETQUERY(x)
Definition: _int.h:142
char * Pointer
Definition: c.h:273
QueryItem * first_item
Definition: tsginidx.c:175
#define PG_RETURN_BOOL(x)
Definition: fmgr.h:319
bool * need_recheck
Definition: tsginidx.c:178
#define TS_EXEC_PHRASE_NO_POS
Definition: ts_utils.h:174
int32 size
Definition: ts_type.h:208
GinTernaryValue * check
Definition: tsginidx.c:176
int * map_item_operand
Definition: tsginidx.c:177

◆ gin_tsquery_consistent_6args()

Datum gin_tsquery_consistent_6args ( PG_FUNCTION_ARGS  )

Definition at line 396 of file tsginidx.c.

References elog, ERROR, gin_tsquery_consistent(), and PG_NARGS.

397 {
398  if (PG_NARGS() < 8) /* should not happen */
399  elog(ERROR, "gin_tsquery_consistent requires eight arguments");
400  return gin_tsquery_consistent(fcinfo);
401 }
Datum gin_tsquery_consistent(PG_FUNCTION_ARGS)
Definition: tsginidx.c:288
#define ERROR
Definition: elog.h:43
#define PG_NARGS()
Definition: fmgr.h:168
#define elog
Definition: elog.h:219

◆ gin_tsquery_consistent_oldsig()

Datum gin_tsquery_consistent_oldsig ( PG_FUNCTION_ARGS  )

Definition at line 418 of file tsginidx.c.

References gin_tsquery_consistent().

419 {
420  return gin_tsquery_consistent(fcinfo);
421 }
Datum gin_tsquery_consistent(PG_FUNCTION_ARGS)
Definition: tsginidx.c:288

◆ gin_tsquery_triconsistent()

Datum gin_tsquery_triconsistent ( PG_FUNCTION_ARGS  )

Definition at line 326 of file tsginidx.c.

References GinChkVal::check, GinChkVal::first_item, GETQUERY, GIN_FALSE, GIN_MAYBE, GIN_TRUE, GinChkVal::map_item_operand, GinChkVal::need_recheck, PG_GETARG_POINTER, PG_GETARG_TSQUERY, PG_RETURN_GIN_TERNARY_VALUE, TSQueryData::size, and TS_execute_ternary().

327 {
329 
330  /* StrategyNumber strategy = PG_GETARG_UINT16(1); */
331  TSQuery query = PG_GETARG_TSQUERY(2);
332 
333  /* int32 nkeys = PG_GETARG_INT32(3); */
334  Pointer *extra_data = (Pointer *) PG_GETARG_POINTER(4);
336  bool recheck;
337 
338  /* Initially assume query doesn't require recheck */
339  recheck = false;
340 
341  if (query->size > 0)
342  {
343  GinChkVal gcv;
344 
345  /*
346  * check-parameter array has one entry for each value (operand) in the
347  * query.
348  */
349  gcv.first_item = GETQUERY(query);
350  gcv.check = check;
351  gcv.map_item_operand = (int *) (extra_data[0]);
352  gcv.need_recheck = &recheck;
353 
354  res = TS_execute_ternary(&gcv, GETQUERY(query), false);
355 
356  if (res == GIN_TRUE && recheck)
357  res = GIN_MAYBE;
358  }
359 
361 }
#define GIN_TRUE
Definition: gin.h:60
#define GIN_MAYBE
Definition: gin.h:61
#define PG_GETARG_TSQUERY(n)
Definition: ts_type.h:238
#define PG_GETARG_POINTER(n)
Definition: fmgr.h:241
#define GETQUERY(x)
Definition: _int.h:142
static GinTernaryValue TS_execute_ternary(GinChkVal *gcv, QueryItem *curitem, bool in_phrase)
Definition: tsginidx.c:215
#define PG_RETURN_GIN_TERNARY_VALUE(x)
Definition: gin.h:66
char * Pointer
Definition: c.h:273
QueryItem * first_item
Definition: tsginidx.c:175
char GinTernaryValue
Definition: gin.h:57
bool * need_recheck
Definition: tsginidx.c:178
#define GIN_FALSE
Definition: gin.h:59
int32 size
Definition: ts_type.h:208
GinTernaryValue * check
Definition: tsginidx.c:176
int * map_item_operand
Definition: tsginidx.c:177

◆ TS_execute_ternary()

static GinTernaryValue TS_execute_ternary ( GinChkVal gcv,
QueryItem curitem,
bool  in_phrase 
)
static

Definition at line 215 of file tsginidx.c.

References check_stack_depth(), checkcondition_gin_internal(), elog, ERROR, GIN_FALSE, GIN_MAYBE, GIN_TRUE, GinChkVal::need_recheck, OP_AND, OP_NOT, OP_OR, OP_PHRASE, QI_VAL, and QueryItem::type.

Referenced by gin_tsquery_triconsistent().

216 {
217  GinTernaryValue val1,
218  val2,
219  result;
220 
221  /* since this function recurses, it could be driven to stack overflow */
223 
224  if (curitem->type == QI_VAL)
225  return
227  (QueryOperand *) curitem,
228  NULL /* don't have position info */ );
229 
230  switch (curitem->qoperator.oper)
231  {
232  case OP_NOT:
233  /* In phrase search, always return MAYBE since we lack positions */
234  if (in_phrase)
235  return GIN_MAYBE;
236  result = TS_execute_ternary(gcv, curitem + 1, in_phrase);
237  if (result == GIN_MAYBE)
238  return result;
239  return !result;
240 
241  case OP_PHRASE:
242 
243  /*
244  * GIN doesn't contain any information about positions, so treat
245  * OP_PHRASE as OP_AND with recheck requirement
246  */
247  *(gcv->need_recheck) = true;
248  /* Pass down in_phrase == true in case there's a NOT below */
249  in_phrase = true;
250 
251  /* FALL THRU */
252 
253  case OP_AND:
254  val1 = TS_execute_ternary(gcv, curitem + curitem->qoperator.left,
255  in_phrase);
256  if (val1 == GIN_FALSE)
257  return GIN_FALSE;
258  val2 = TS_execute_ternary(gcv, curitem + 1, in_phrase);
259  if (val2 == GIN_FALSE)
260  return GIN_FALSE;
261  if (val1 == GIN_TRUE && val2 == GIN_TRUE)
262  return GIN_TRUE;
263  else
264  return GIN_MAYBE;
265 
266  case OP_OR:
267  val1 = TS_execute_ternary(gcv, curitem + curitem->qoperator.left,
268  in_phrase);
269  if (val1 == GIN_TRUE)
270  return GIN_TRUE;
271  val2 = TS_execute_ternary(gcv, curitem + 1, in_phrase);
272  if (val2 == GIN_TRUE)
273  return GIN_TRUE;
274  if (val1 == GIN_FALSE && val2 == GIN_FALSE)
275  return GIN_FALSE;
276  else
277  return GIN_MAYBE;
278 
279  default:
280  elog(ERROR, "unrecognized operator: %d", curitem->qoperator.oper);
281  }
282 
283  /* not reachable, but keep compiler quiet */
284  return false;
285 }
#define GIN_TRUE
Definition: gin.h:60
QueryOperator qoperator
Definition: ts_type.h:196
static GinTernaryValue checkcondition_gin_internal(GinChkVal *gcv, QueryOperand *val, ExecPhraseData *data)
Definition: tsginidx.c:182
#define GIN_MAYBE
Definition: gin.h:61
#define QI_VAL
Definition: ts_type.h:134
#define OP_OR
Definition: ts_type.h:168
static GinTernaryValue TS_execute_ternary(GinChkVal *gcv, QueryItem *curitem, bool in_phrase)
Definition: tsginidx.c:215
#define OP_AND
Definition: ts_type.h:167
#define ERROR
Definition: elog.h:43
char GinTernaryValue
Definition: gin.h:57
void check_stack_depth(void)
Definition: postgres.c:3150
QueryItemType type
Definition: ts_type.h:195
bool * need_recheck
Definition: tsginidx.c:178
#define OP_PHRASE
Definition: ts_type.h:169
#define GIN_FALSE
Definition: gin.h:59
uint32 left
Definition: ts_type.h:184
#define elog
Definition: elog.h:219
#define OP_NOT
Definition: ts_type.h:166