45#include "utils/fmgroids.h"
61#define MAXTOKENTYPE 256
62#define MAXDICTSPERTT 100
156 elog(
ERROR,
"cache lookup failed for text search parser %u",
164 elog(
ERROR,
"text search parser %u has no prsstart method", prsId);
166 elog(
ERROR,
"text search parser %u has no prstoken method", prsId);
168 elog(
ERROR,
"text search parser %u has no prsend method", prsId);
181 entry->
prsId = prsId;
184 entry->
endOid = prs->prsend;
256 elog(
ERROR,
"cache lookup failed for text search dictionary %u",
264 elog(
ERROR,
"text search dictionary %u has no template", dictId);
272 elog(
ERROR,
"cache lookup failed for text search template %u",
280 elog(
ERROR,
"text search template %u has no lexize method",
428 elog(
ERROR,
"cache lookup failed for text search configuration %u",
436 elog(
ERROR,
"text search configuration %u has no parser", cfgId);
462 entry->
cfgId = cfgId;
463 entry->
prsId = cfg->cfgparser;
496 elog(
ERROR,
"maptokentype entries are out of order");
505 sizeof(
Oid) * ndicts);
507 sizeof(
Oid) * ndicts);
517 elog(
ERROR,
"too many pg_ts_config_map entries for one token type");
532 sizeof(
Oid) * ndicts);
534 sizeof(
Oid) * ndicts);
571 elog(
ERROR,
"text search configuration isn't set");
593 (
Node *) &escontext);
622 (
Node *) &escontext);
638 errmsg(
"text search configuration \"%s\" does not exist", *
newval)));
651 elog(
ERROR,
"cache lookup failed for text search configuration %u",
#define Assert(condition)
#define MemSet(start, val, len)
#define OidIsValid(objectId)
void CreateCacheMemoryContext(void)
memcpy(sums, checksumBaseOffsets, sizeof(checksumBaseOffsets))
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)
#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(SysCacheIdentifier 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]
END_CATALOG_STRUCT typedef FormData_pg_ts_config * Form_pg_ts_config
END_CATALOG_STRUCT typedef FormData_pg_ts_config_map * Form_pg_ts_config_map
END_CATALOG_STRUCT typedef FormData_pg_ts_dict * Form_pg_ts_dict
END_CATALOG_STRUCT typedef FormData_pg_ts_parser * Form_pg_ts_parser
END_CATALOG_STRUCT typedef 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(SysCacheIdentifier cacheId, Datum key1)
Datum SysCacheGetAttr(SysCacheIdentifier 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)
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 void InvalidateTSCacheCallBack(Datum arg, SysCacheIdentifier cacheid, uint32 hashvalue)
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)