70 Datum *entries = NULL;
72 *nentries = vector->
size;
80 for (
i = 0;
i < vector->
size;
i++)
107 Datum *entries = NULL;
117 int *map_item_operand;
131 for (
i = 0;
i < query->
size;
i++)
139 partialmatch = *ptr_partialmatch = (
bool *)
palloc(
sizeof(
bool) *
j);
147 map_item_operand = (
int *)
palloc0(
sizeof(
int) * query->
size);
151 for (
i = 0;
i < query->
size;
i++)
161 partialmatch[
j] =
val->prefix;
162 (*extra_data)[
j] = (
Pointer) map_item_operand;
163 map_item_operand[
i] =
j;
203 if (
val->weight != 0 ||
data != NULL)
309 elog(
ERROR,
"gin_extract_tsvector requires three arguments");
321 elog(
ERROR,
"gin_extract_tsquery requires seven arguments");
333 elog(
ERROR,
"gin_tsquery_consistent requires eight arguments");
static void PGresult * res
elog(ERROR, "%s: %s", p2, msg)
#define PG_FREE_IF_COPY(ptr, n)
#define PG_GETARG_TEXT_PP(n)
#define PG_GETARG_POINTER(n)
#define PG_GETARG_UINT16(n)
#define PG_RETURN_INT32(x)
#define PG_RETURN_POINTER(x)
#define PG_RETURN_BOOL(x)
#define PG_RETURN_GIN_TERNARY_VALUE(x)
#define GIN_SEARCH_MODE_ALL
#define GIN_SEARCH_MODE_DEFAULT
void * palloc0(Size size)
static Datum PointerGetDatum(const void *X)
static int cmp(const chr *x, const chr *y, size_t len)
#define PG_GETARG_TSVECTOR(n)
#define PG_GETARG_TSQUERY(n)
#define TS_EXEC_PHRASE_NO_POS
Datum gin_cmp_prefix(PG_FUNCTION_ARGS)
Datum gin_tsquery_consistent_oldsig(PG_FUNCTION_ARGS)
Datum gin_tsquery_triconsistent(PG_FUNCTION_ARGS)
Datum gin_extract_tsquery_5args(PG_FUNCTION_ARGS)
Datum gin_cmp_tslexeme(PG_FUNCTION_ARGS)
Datum gin_extract_tsquery(PG_FUNCTION_ARGS)
Datum gin_tsquery_consistent_6args(PG_FUNCTION_ARGS)
Datum gin_extract_tsquery_oldsig(PG_FUNCTION_ARGS)
Datum gin_extract_tsvector_2args(PG_FUNCTION_ARGS)
Datum gin_extract_tsvector(PG_FUNCTION_ARGS)
Datum gin_tsquery_consistent(PG_FUNCTION_ARGS)
static TSTernaryValue checkcondition_gin(void *checkval, QueryOperand *val, ExecPhraseData *data)
int32 tsCompareString(char *a, int lena, char *b, int lenb, bool prefix)
bool tsquery_requires_match(QueryItem *curitem)
TSTernaryValue TS_execute_ternary(QueryItem *curitem, void *arg, uint32 flags, TSExecuteCallback chkcond)
#define VARSIZE_ANY_EXHDR(PTR)
text * cstring_to_text_with_len(const char *s, int len)