239 for (
j = 0;
j < vector->
size;
j++)
339 elog(
DEBUG3,
"tsvector_stats: target # mces = %d, bucket width = %d, "
340 "# lexemes = %d, hashtable size = %d, usable entries = %d",
540 return (*t2)->
frequency - (*t1)->frequency;
#define Assert(condition)
int default_statistics_target
static dshash_hash hash_key(dshash_table *hash_table, const void *key)
void * hash_search(HTAB *hashp, const void *keyPtr, HASHACTION action, bool *foundPtr)
HTAB * hash_create(const char *tabname, int64 nelem, const HASHCTL *info, int flags)
void * hash_seq_search(HASH_SEQ_STATUS *status)
int64 hash_get_num_entries(HTAB *hashp)
void hash_seq_init(HASH_SEQ_STATUS *status, HTAB *hashp)
#define palloc_array(type, count)
#define PG_GETARG_POINTER(n)
#define PG_RETURN_BOOL(x)
static Datum hash_any(const unsigned char *k, int keylen)
void pfree(void *pointer)
MemoryContext CurrentMemoryContext
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
void qsort_interruptible(void *base, size_t nel, size_t elsize, qsort_arg_comparator cmp, void *arg)
static uint32 DatumGetUInt32(Datum X)
static Datum PointerGetDatum(const void *X)
static Pointer DatumGetPointer(Datum X)
int16 stakind[STATISTIC_NUM_SLOTS]
MemoryContext anl_context
Oid statypid[STATISTIC_NUM_SLOTS]
Oid staop[STATISTIC_NUM_SLOTS]
Oid stacoll[STATISTIC_NUM_SLOTS]
char statypalign[STATISTIC_NUM_SLOTS]
float4 * stanumbers[STATISTIC_NUM_SLOTS]
bool statypbyval[STATISTIC_NUM_SLOTS]
int16 statyplen[STATISTIC_NUM_SLOTS]
int numvalues[STATISTIC_NUM_SLOTS]
Datum * stavalues[STATISTIC_NUM_SLOTS]
int numnumbers[STATISTIC_NUM_SLOTS]
AnalyzeAttrComputeStatsFunc compute_stats
static int trackitem_compare_frequencies_desc(const void *e1, const void *e2, void *arg)
static void prune_lexemes_hashtable(HTAB *lexemes_tab, int b_current)
static int trackitem_compare_lexemes(const void *e1, const void *e2, void *arg)
static int lexeme_compare(const void *key1, const void *key2)
static int lexeme_match(const void *key1, const void *key2, Size keysize)
Datum ts_typanalyze(PG_FUNCTION_ARGS)
static void compute_tsvector_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc, int samplerows, double totalrows)
static uint32 lexeme_hash(const void *key, Size keysize)
static TSVector DatumGetTSVector(Datum X)
static Datum TSVectorGetDatum(const TSVectorData *X)
void vacuum_delay_point(bool is_analyze)
Datum(* AnalyzeAttrFetchFunc)(VacAttrStatsP stats, int rownum, bool *isNull)
static Size VARSIZE_ANY(const void *PTR)
text * cstring_to_text_with_len(const char *s, int len)