PostgreSQL Source Code
git master
|
#include "utils/guc.h"
Go to the source code of this file.
Data Structures | |
struct | TSAnyCacheEntry |
struct | TSParserCacheEntry |
struct | TSDictionaryCacheEntry |
struct | ListDictionary |
struct | TSConfigCacheEntry |
Typedefs | |
typedef struct TSAnyCacheEntry | TSAnyCacheEntry |
typedef struct TSParserCacheEntry | TSParserCacheEntry |
typedef struct TSDictionaryCacheEntry | TSDictionaryCacheEntry |
Functions | |
TSParserCacheEntry * | lookup_ts_parser_cache (Oid prsId) |
TSDictionaryCacheEntry * | lookup_ts_dictionary_cache (Oid dictId) |
TSConfigCacheEntry * | lookup_ts_config_cache (Oid cfgId) |
Oid | getTSCurrentConfig (bool emitError) |
bool | check_TSCurrentConfig (char **newval, void **extra, GucSource source) |
void | assign_TSCurrentConfig (const char *newval, void *extra) |
Variables | |
char * | TSCurrentConfig |
typedef struct TSAnyCacheEntry TSAnyCacheEntry |
typedef struct TSDictionaryCacheEntry TSDictionaryCacheEntry |
typedef struct TSParserCacheEntry TSParserCacheEntry |
void assign_TSCurrentConfig | ( | const char * | newval, |
void * | extra | ||
) |
Definition at line 591 of file ts_cache.c.
References buf, elog, ereport, errcode(), errmsg(), ERROR, free, get_namespace_name(), get_ts_config_oid(), GETSTRUCT, HeapTupleIsValid, InvalidOid, IsTransactionState(), MyDatabaseId, NameStr, NOTICE, ObjectIdGetDatum, OidIsValid, pfree(), PGC_S_TEST, quote_qualified_identifier(), ReleaseSysCache(), SearchSysCache1(), stringToQualifiedNameList(), and TSCONFIGOID.
Definition at line 560 of file ts_cache.c.
References elog, ERROR, get_ts_config_oid(), init_ts_config_cache(), InvalidOid, OidIsValid, stringToQualifiedNameList(), TSCurrentConfig, and TSCurrentConfigCache.
Referenced by get_current_ts_config(), json_string_to_tsvector(), json_to_tsvector(), jsonb_string_to_tsvector(), jsonb_to_tsvector(), phraseto_tsquery(), plainto_tsquery(), to_tsquery(), to_tsvector(), ts_headline(), ts_headline_json(), ts_headline_json_opt(), ts_headline_jsonb(), ts_headline_jsonb_opt(), ts_headline_opt(), and websearch_to_tsquery().
TSConfigCacheEntry* lookup_ts_config_cache | ( | Oid | cfgId | ) |
Definition at line 389 of file ts_cache.c.
References AccessShareLock, Assert, BTEqualStrategyNumber, CacheMemoryContext, TSConfigCacheEntry::cfgId, ListDictionary::dictIds, elog, ERROR, ForwardScanDirection, GETSTRUCT, HASH_ENTER, HASH_FIND, hash_search(), HeapTupleIsValid, i, index_close(), index_open(), init_ts_config_cache(), TSConfigCacheEntry::isvalid, lastUsedConfig, ListDictionary::len, TSConfigCacheEntry::lenmap, TSConfigCacheEntry::map, MAXDICTSPERTT, MAXTOKENTYPE, MemoryContextAlloc(), MemSet, ObjectIdGetDatum, OidIsValid, pfree(), TSConfigCacheEntry::prsId, ReleaseSysCache(), ScanKeyInit(), SearchSysCache1(), systable_beginscan_ordered(), systable_endscan_ordered(), systable_getnext_ordered(), table_close(), table_open(), TSConfigMapIndexId, and TSCONFIGOID.
Referenced by hlparsetext(), parsetext(), ts_headline_byid_opt(), ts_headline_json_byid_opt(), and ts_headline_jsonb_byid_opt().
TSDictionaryCacheEntry* lookup_ts_dictionary_cache | ( | Oid | dictId | ) |
Definition at line 210 of file ts_cache.c.
References ALLOCSET_SMALL_SIZES, AllocSetContextCreate, Assert, CacheMemoryContext, CacheRegisterSyscacheCallback(), CreateCacheMemoryContext(), DatumGetPointer, deserialize_deflist(), TSDictionaryCacheEntry::dictCtx, TSDictionaryCacheEntry::dictData, TSDictionaryCacheEntry::dictId, elog, HASHCTL::entrysize, ERROR, fmgr_info_cxt(), GETSTRUCT, HASH_BLOBS, hash_create(), HASH_ELEM, HASH_ENTER, HASH_FIND, hash_search(), HeapTupleIsValid, InvalidateTSCacheCallBack(), TSDictionaryCacheEntry::isvalid, HASHCTL::keysize, lastUsedDictionary, TSDictionaryCacheEntry::lexize, TSDictionaryCacheEntry::lexizeOid, MemoryContextCopyAndSetIdentifier, MemoryContextReset(), MemoryContextSetIdentifier(), MemoryContextSwitchTo(), MemSet, NameStr, NIL, ObjectIdGetDatum, OidFunctionCall1, OidIsValid, PointerGetDatum, ReleaseSysCache(), SearchSysCache1(), SysCacheGetAttr(), TSDICTOID, and TSTEMPLATEOID.
Referenced by LexizeExec(), thesaurus_init(), thesaurus_lexize(), ts_lexize(), and unaccent_dict().
TSParserCacheEntry* lookup_ts_parser_cache | ( | Oid | prsId | ) |
Definition at line 112 of file ts_cache.c.
References Assert, CacheMemoryContext, CacheRegisterSyscacheCallback(), CreateCacheMemoryContext(), elog, TSParserCacheEntry::endOid, HASHCTL::entrysize, ERROR, fmgr_info_cxt(), GETSTRUCT, HASH_BLOBS, hash_create(), HASH_ELEM, HASH_ENTER, HASH_FIND, hash_search(), TSParserCacheEntry::headlineOid, HeapTupleIsValid, InvalidateTSCacheCallBack(), TSParserCacheEntry::isvalid, HASHCTL::keysize, lastUsedParser, TSParserCacheEntry::lextypeOid, MemSet, ObjectIdGetDatum, OidIsValid, PointerGetDatum, TSParserCacheEntry::prsend, TSParserCacheEntry::prsheadline, TSParserCacheEntry::prsId, TSParserCacheEntry::prsstart, TSParserCacheEntry::prstoken, ReleaseSysCache(), SearchSysCache1(), TSParserCacheEntry::startOid, TSParserCacheEntry::tokenOid, and TSPARSEROID.
Referenced by getTokenTypes(), hlparsetext(), parsetext(), prs_setup_firstcall(), ts_headline_byid_opt(), ts_headline_json_byid_opt(), ts_headline_jsonb_byid_opt(), and tt_setup_firstcall().
char* TSCurrentConfig |
Definition at line 75 of file ts_cache.c.
Referenced by getTSCurrentConfig().