45#include "utils/fmgroids.h"
60#define MAXTOKENTYPE 256
61#define MAXDICTSPERTT 100
155 elog(
ERROR,
"cache lookup failed for text search parser %u",
163 elog(
ERROR,
"text search parser %u has no prsstart method", prsId);
165 elog(
ERROR,
"text search parser %u has no prstoken method", prsId);
167 elog(
ERROR,
"text search parser %u has no prsend method", prsId);
180 entry->
prsId = prsId;
183 entry->
endOid = prs->prsend;
255 elog(
ERROR,
"cache lookup failed for text search dictionary %u",
263 elog(
ERROR,
"text search dictionary %u has no template", dictId);
271 elog(
ERROR,
"cache lookup failed for text search template %u",
279 elog(
ERROR,
"text search template %u has no lexize method",
427 elog(
ERROR,
"cache lookup failed for text search configuration %u",
435 elog(
ERROR,
"text search configuration %u has no parser", cfgId);
461 entry->
cfgId = cfgId;
462 entry->
prsId = cfg->cfgparser;
495 elog(
ERROR,
"maptokentype entries are out of order");
504 sizeof(
Oid) * ndicts);
506 sizeof(
Oid) * ndicts);
516 elog(
ERROR,
"too many pg_ts_config_map entries for one token type");
531 sizeof(
Oid) * ndicts);
533 sizeof(
Oid) * ndicts);
570 elog(
ERROR,
"text search configuration isn't set");
592 (
Node *) &escontext);
621 (
Node *) &escontext);
637 errmsg(
"text search configuration \"%s\" does not exist", *
newval)));
650 elog(
ERROR,
"cache lookup failed for text search configuration %u",
#define Assert(condition)
#define MemSet(start, val, len)
#define OidIsValid(objectId)
void CreateCacheMemoryContext(void)
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)
void hash_seq_init(HASH_SEQ_STATUS *status, HTAB *hashp)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
void fmgr_info_cxt(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt)
#define OidFunctionCall1(functionId, arg1)
SysScanDesc systable_beginscan_ordered(Relation heapRelation, Relation indexRelation, Snapshot snapshot, int nkeys, ScanKey key)
void systable_endscan_ordered(SysScanDesc sysscan)
HeapTuple systable_getnext_ordered(SysScanDesc sysscan, ScanDirection direction)
char * guc_strdup(int elevel, const char *src)
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
void index_close(Relation relation, LOCKMODE lockmode)
Relation index_open(Oid relationId, LOCKMODE lockmode)
void CacheRegisterSyscacheCallback(int cacheid, SyscacheCallbackFunction func, Datum arg)
char * get_namespace_name(Oid nspid)
void * MemoryContextAlloc(MemoryContext context, Size size)
void MemoryContextReset(MemoryContext context)
void pfree(void *pointer)
MemoryContext CacheMemoryContext
void MemoryContextSetIdentifier(MemoryContext context, const char *id)
#define AllocSetContextCreate
#define ALLOCSET_SMALL_SIZES
#define MemoryContextCopyAndSetIdentifier(cxt, id)
Oid get_ts_config_oid(List *names, bool missing_ok)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
static rewind_source * source
static char buf[DEFAULT_XLOG_SEG_SIZE]
FormData_pg_ts_config * Form_pg_ts_config
FormData_pg_ts_config_map * Form_pg_ts_config_map
FormData_pg_ts_dict * Form_pg_ts_dict
FormData_pg_ts_parser * Form_pg_ts_parser
FormData_pg_ts_template * Form_pg_ts_template
static Datum PointerGetDatum(const void *X)
static Datum ObjectIdGetDatum(Oid X)
static Pointer DatumGetPointer(Datum X)
static unsigned hash(unsigned *uv, int n)
List * stringToQualifiedNameList(const char *string, Node *escontext)
char * quote_qualified_identifier(const char *qualifier, const char *ident)
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
#define BTEqualStrategyNumber
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
Datum SysCacheGetAttr(int cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
static TSDictionaryCacheEntry * lastUsedDictionary
bool check_default_text_search_config(char **newval, void **extra, GucSource source)
Oid getTSCurrentConfig(bool emitError)
static void InvalidateTSCacheCallBack(Datum arg, int cacheid, uint32 hashvalue)
TSConfigCacheEntry * lookup_ts_config_cache(Oid cfgId)
static void init_ts_config_cache(void)
TSParserCacheEntry * lookup_ts_parser_cache(Oid prsId)
static HTAB * TSDictionaryCacheHash
static HTAB * TSConfigCacheHash
static TSParserCacheEntry * lastUsedParser
static Oid TSCurrentConfigCache
void assign_default_text_search_config(const char *newval, void *extra)
TSDictionaryCacheEntry * lookup_ts_dictionary_cache(Oid dictId)
static TSConfigCacheEntry * lastUsedConfig
static HTAB * TSParserCacheHash
List * deserialize_deflist(Datum txt)
bool IsTransactionState(void)