30 elog(
ERROR,
"unexpected number of arguments to gin_extract_trgm");
39 Datum *entries = NULL;
57 for (
i = 0;
i < trglen;
i++)
81 Datum *entries = NULL;
98 elog(
ERROR,
"cannot handle ~~* with case-sensitive trigrams");
112 elog(
ERROR,
"cannot handle ~* with case-sensitive trigrams");
127 for (
i = 0;
i < trglen;
i++)
139 elog(
ERROR,
"unrecognized strategy number: %d", strategy);
151 for (
i = 0;
i < trglen;
i++)
196 for (
i = 0;
i < nkeys;
i++)
217 res = (nkeys == 0) ?
false :
222 elog(
ERROR,
"cannot handle ~~* with case-sensitive trigrams");
229 for (
i = 0;
i < nkeys;
i++)
240 elog(
ERROR,
"cannot handle ~* with case-sensitive trigrams");
254 elog(
ERROR,
"unrecognized strategy number: %d", strategy);
292 for (
i = 0;
i < nkeys;
i++)
308 elog(
ERROR,
"cannot handle ~~* with case-sensitive trigrams");
315 for (
i = 0;
i < nkeys;
i++)
326 elog(
ERROR,
"cannot handle ~* with case-sensitive trigrams");
342 boolcheck = (
bool *)
palloc(
sizeof(
bool) * nkeys);
343 for (
i = 0;
i < nkeys;
i++)
352 elog(
ERROR,
"unrecognized strategy number: %d", strategy);
#define Assert(condition)
static void PGresult * res
#define PG_GETARG_TEXT_PP(n)
#define PG_GETARG_POINTER(n)
#define PG_GETARG_UINT16(n)
#define PG_GETARG_INT32(n)
#define PG_RETURN_POINTER(x)
#define PG_GET_COLLATION()
#define PG_RETURN_BOOL(x)
#define PG_RETURN_GIN_TERNARY_VALUE(x)
#define GIN_SEARCH_MODE_ALL
void pfree(void *pointer)
MemoryContext CurrentMemoryContext
static Datum Int32GetDatum(int32 X)
#define RegExpICaseStrategyNumber
TRGM * generate_trgm(char *str, int slen)
#define WordSimilarityStrategyNumber
#define StrictWordSimilarityStrategyNumber
TRGM * generate_wildcard_trgm(const char *str, int slen)
uint32 trgm2int(trgm *ptr)
double index_strategy_get_limit(StrategyNumber strategy)
#define SimilarityStrategyNumber
bool trigramsMatchGraph(TrgmPackedGraph *graph, bool *check)
#define ILikeStrategyNumber
TRGM * createTrgmNFA(text *text_re, Oid collation, TrgmPackedGraph **graph, MemoryContext rcontext)
#define LikeStrategyNumber
#define EqualStrategyNumber
#define RegExpStrategyNumber
Datum gin_trgm_consistent(PG_FUNCTION_ARGS)
Datum gin_trgm_triconsistent(PG_FUNCTION_ARGS)
Datum gin_extract_value_trgm(PG_FUNCTION_ARGS)
Datum gin_extract_query_trgm(PG_FUNCTION_ARGS)
Datum gin_extract_trgm(PG_FUNCTION_ARGS)
PG_FUNCTION_INFO_V1(gin_extract_trgm)
#define VARSIZE_ANY_EXHDR(PTR)