68 Datum *entries = NULL;
70 *nentries = vector->
size;
78 for (
i = 0;
i < vector->
size;
i++)
105 Datum *entries = NULL;
115 int *map_item_operand;
129 for (
i = 0;
i < query->
size;
i++)
137 partialmatch = *ptr_partialmatch = (
bool *)
palloc(
sizeof(
bool) *
j);
145 map_item_operand = (
int *)
palloc0(
sizeof(
int) * query->
size);
149 for (
i = 0;
i < query->
size;
i++)
159 partialmatch[
j] =
val->prefix;
160 (*extra_data)[
j] = (
Pointer) map_item_operand;
161 map_item_operand[
i] =
j;
201 if (
val->weight != 0 ||
data != NULL)
307 elog(
ERROR,
"gin_extract_tsvector requires three arguments");
319 elog(
ERROR,
"gin_extract_tsquery requires seven arguments");
331 elog(
ERROR,
"gin_tsquery_consistent requires eight arguments");
static void PGresult * res
#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)